ui/doom-modeline: remove all-the-icons-scale-factor let-bindings #278

This commit is contained in:
Henrik Lissner 2017-12-09 14:51:15 -05:00
parent 13561c3ddf
commit 4a504a07aa
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -309,35 +309,34 @@ buffer where knowing the current project directory is important."
(def-modeline-segment! buffer-info
"Combined information about the current buffer, including the current working
directory, the file name, and its state (modified, read-only or non-existent)."
(let ((all-the-icons-scale-factor 1.2))
(concat (cond (buffer-read-only
(concat (all-the-icons-octicon
"lock"
:face 'doom-modeline-warning
:v-adjust -0.05)
" "))
((buffer-modified-p)
(concat (all-the-icons-faicon
"floppy-o"
:face 'doom-modeline-buffer-modified
:v-adjust -0.0575)
" "))
((and buffer-file-name
(not (file-exists-p buffer-file-name)))
(concat (all-the-icons-octicon
"circle-slash"
:face 'doom-modeline-urgent
:v-adjust -0.05)
" "))
((buffer-narrowed-p)
(concat (all-the-icons-octicon
"fold"
:face 'doom-modeline-warning
:v-adjust -0.05)
" ")))
(if buffer-file-name
(+doom-modeline-buffer-file-name)
"%b"))))
(concat (cond (buffer-read-only
(concat (all-the-icons-octicon
"lock"
:face 'doom-modeline-warning
:v-adjust -0.05)
" "))
((buffer-modified-p)
(concat (all-the-icons-faicon
"floppy-o"
:face 'doom-modeline-buffer-modified
:v-adjust -0.0575)
" "))
((and buffer-file-name
(not (file-exists-p buffer-file-name)))
(concat (all-the-icons-octicon
"circle-slash"
:face 'doom-modeline-urgent
:v-adjust -0.05)
" "))
((buffer-narrowed-p)
(concat (all-the-icons-octicon
"fold"
:face 'doom-modeline-warning
:v-adjust -0.05)
" ")))
(if buffer-file-name
(+doom-modeline-buffer-file-name)
"%b")))
;;
(def-modeline-segment! buffer-info-simple
@ -381,7 +380,6 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(state (vc-state buffer-file-name backend)))
(let ((face 'mode-line-inactive)
(active (active))
(all-the-icons-scale-factor 1.0)
(all-the-icons-default-adjust -0.1))
(concat " "
(cond ((memq state '(edited added))
@ -389,7 +387,6 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(all-the-icons-octicon
"git-compare"
:face face
:height 1.2
:v-adjust -0.05))
((eq state 'needs-merge)
(if active (setq face 'doom-modeline-info))
@ -405,7 +402,6 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(all-the-icons-octicon
"git-compare"
:face face
:height 1.2
:v-adjust -0.05)))
" "
(propertize (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2))