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 'all-the-icons)
(require 'dash)
(require 'memoize)
(require 'shrink-path)
(require 'eldoc-eval)
@ -410,7 +409,7 @@ active."
(eq (selected-window) doom-modeline-current-window))
;; 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."
(propertize
" " '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)
'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)
"Propertized `buffer-file-name' showing directories relative to project's root only."
(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)
'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)
"Propertized `buffer-file-name'.
If TRUNCATE-PROJECT-ROOT-PARENT is t space will be saved by truncating it down