From 25fa66bb086d5cbf661f148b721357adb41feeda Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Sat, 24 Nov 2018 12:18:41 +0800 Subject: [PATCH] Fix #49: void-function file-local-name in spacemacs. `file-local-name' is introduced in 25.2.2. --- doom-modeline.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 ;;