Fix #49: void-function file-local-name in spacemacs.

`file-local-name' is introduced in 25.2.2.
This commit is contained in:
Vincent Zhang 2018-11-24 12:18:41 +08:00
parent 969d001290
commit 25fa66bb08

View file

@ -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'.") "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 ;; externals
;; ;;