modeline: fix blank :inherit prop in *buffer-info

This commit is contained in:
Henrik Lissner 2016-10-05 12:51:09 +02:00
parent 01466fba55
commit 823dc07dc9

View file

@ -177,7 +177,10 @@ project root). Excludes the file basename. See `doom-buffer-name' for that."
"Combined information about the current buffer, including the current working "Combined information about the current buffer, including the current working
directory, the file name, and its state (modified, read-only or non-existent)." directory, the file name, and its state (modified, read-only or non-existent)."
(let ((all-the-icons-scale-factor 1.2) (let ((all-the-icons-scale-factor 1.2)
(modified-p (buffer-modified-p))) (modified-p (buffer-modified-p))
faces)
(if active (push 'doom-modeline-buffer-path faces))
(if modified-p (push 'doom-modeline-buffer-modified faces))
(concat (if buffer-read-only (concat (if buffer-read-only
(concat (all-the-icons-octicon (concat (all-the-icons-octicon
"lock" "lock"
@ -197,8 +200,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
:v-adjust -0.05) :v-adjust -0.05)
" ")) " "))
(propertize (doom-buffer-path) (propertize (doom-buffer-path)
'face `(:inherit (,(if modified-p 'doom-modeline-buffer-modified) 'face (if (or modified-p active) `(:inherit ,faces))))))
,(if active 'doom-modeline-buffer-path)))))))
(defun *buffer-encoding () (defun *buffer-encoding ()
"The encoding and eol style of the buffer." "The encoding and eol style of the buffer."