diff --git a/doom-modeline.el b/doom-modeline.el index 9ae950b..03d9e01 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -100,6 +100,19 @@ The icons may not be showed correctly on Windows. Disable to make it work.") "Whether show the icon for major mode. It should respect `doom-modeline-icon'.") +;; +;; compatibility +;; + +;;`file-local-name' is introduced in 25.2.2. +(unless (fboundp 'file-local-name) + (defun file-local-name (file) + "Return the local name component of FILE. +It returns a file name which can be used directly as argument of +`process-file', `start-file-process', or `shell-command'." + (or (file-remote-p file 'localname) file))) + + ;; ;; externals ;;