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 (def-modeline-segment! buffer-info
"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)) (concat (cond (buffer-read-only
(concat (cond (buffer-read-only (concat (all-the-icons-octicon
(concat (all-the-icons-octicon "lock"
"lock" :face 'doom-modeline-warning
:face 'doom-modeline-warning :v-adjust -0.05)
:v-adjust -0.05) " "))
" ")) ((buffer-modified-p)
((buffer-modified-p) (concat (all-the-icons-faicon
(concat (all-the-icons-faicon "floppy-o"
"floppy-o" :face 'doom-modeline-buffer-modified
:face 'doom-modeline-buffer-modified :v-adjust -0.0575)
:v-adjust -0.0575) " "))
" ")) ((and buffer-file-name
((and buffer-file-name (not (file-exists-p buffer-file-name)))
(not (file-exists-p buffer-file-name))) (concat (all-the-icons-octicon
(concat (all-the-icons-octicon "circle-slash"
"circle-slash" :face 'doom-modeline-urgent
:face 'doom-modeline-urgent :v-adjust -0.05)
:v-adjust -0.05) " "))
" ")) ((buffer-narrowed-p)
((buffer-narrowed-p) (concat (all-the-icons-octicon
(concat (all-the-icons-octicon "fold"
"fold" :face 'doom-modeline-warning
:face 'doom-modeline-warning :v-adjust -0.05)
:v-adjust -0.05) " ")))
" "))) (if buffer-file-name
(if buffer-file-name (+doom-modeline-buffer-file-name)
(+doom-modeline-buffer-file-name) "%b")))
"%b"))))
;; ;;
(def-modeline-segment! buffer-info-simple (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))) (state (vc-state buffer-file-name backend)))
(let ((face 'mode-line-inactive) (let ((face 'mode-line-inactive)
(active (active)) (active (active))
(all-the-icons-scale-factor 1.0)
(all-the-icons-default-adjust -0.1)) (all-the-icons-default-adjust -0.1))
(concat " " (concat " "
(cond ((memq state '(edited added)) (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 (all-the-icons-octicon
"git-compare" "git-compare"
:face face :face face
:height 1.2
:v-adjust -0.05)) :v-adjust -0.05))
((eq state 'needs-merge) ((eq state 'needs-merge)
(if active (setq face 'doom-modeline-info)) (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 (all-the-icons-octicon
"git-compare" "git-compare"
:face face :face face
:height 1.2
:v-adjust -0.05))) :v-adjust -0.05)))
" " " "
(propertize (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)) (propertize (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2))