Remove memoize dependency.

This commit is contained in:
Vincent Zhang 2018-06-13 21:34:31 +08:00
parent 21b9230fc7
commit da777a87c1

View file

@ -47,7 +47,6 @@
(require 'projectile) (require 'projectile)
(require 'all-the-icons) (require 'all-the-icons)
(require 'dash) (require 'dash)
(require 'memoize)
(require 'shrink-path) (require 'shrink-path)
(require 'eldoc-eval) (require 'eldoc-eval)
@ -410,7 +409,7 @@ active."
(eq (selected-window) doom-modeline-current-window)) (eq (selected-window) doom-modeline-current-window))
;; Inspired from `powerline's `pl/make-xpm'. ;; Inspired from `powerline's `pl/make-xpm'.
(defmemoize doom-modeline--make-xpm (color height width) (defun doom-modeline--make-xpm (color height width)
"Create an XPM bitmap." "Create an XPM bitmap."
(propertize (propertize
" " 'display " " 'display
@ -473,9 +472,6 @@ If TRUNCATE-TAIL is t also truncate the parent directory of the file."
(propertize (file-name-nondirectory buffer-file-name) (propertize (file-name-nondirectory buffer-file-name)
'face (if file-faces `(:inherit ,file-faces))))))))) 'face (if file-faces `(:inherit ,file-faces)))))))))
(defmemoize doom-modeline-file-relative-name (filename directory)
(file-relative-name filename directory))
(defun doom-modeline--buffer-file-name-relative (&optional include-project) (defun doom-modeline--buffer-file-name-relative (&optional include-project)
"Propertized `buffer-file-name' showing directories relative to project's root only." "Propertized `buffer-file-name' showing directories relative to project's root only."
(let ((root (doom-modeline-project-root)) (let ((root (doom-modeline-project-root))
@ -492,14 +488,6 @@ If TRUNCATE-TAIL is t also truncate the parent directory of the file."
(propertize (file-name-nondirectory buffer-file-truename) (propertize (file-name-nondirectory buffer-file-truename)
'face (if file-faces `(:inherit ,file-faces)))))))) 'face (if file-faces `(:inherit ,file-faces))))))))
(defmemoize doom-modeline-abbreviate-file-name (file-name)
(abbreviate-file-name file-name))
(defmemoize doom-modeline-shrink-path-file-mixed (project-root file-name)
(shrink-path-file-mixed project-root
(file-name-directory file-name)
file-name))
(defun doom-modeline--buffer-file-name (truncate-project-root-parent) (defun doom-modeline--buffer-file-name (truncate-project-root-parent)
"Propertized `buffer-file-name'. "Propertized `buffer-file-name'.
If TRUNCATE-PROJECT-ROOT-PARENT is t space will be saved by truncating it down If TRUNCATE-PROJECT-ROOT-PARENT is t space will be saved by truncating it down