Refactor: minor modes.

This commit is contained in:
Vincent Zhang 2018-12-21 02:28:27 +08:00
parent e5e4964691
commit 7519a379d7

View file

@ -933,11 +933,12 @@ mouse-3: Toggle minor modes"
(doom-modeline-def-segment minor-modes (doom-modeline-def-segment minor-modes
(when doom-modeline-minor-modes (when doom-modeline-minor-modes
(let ((active (doom-modeline--active)))
(if (bound-and-true-p minions-mode) (if (bound-and-true-p minions-mode)
(concat (concat
" " " "
(propertize minions-mode-line-lighter (propertize minions-mode-line-lighter
'face (if (doom-modeline--active) 'doom-modeline-buffer-minor-mode) 'face (if active 'doom-modeline-buffer-minor-mode)
'help-echo "Minions 'help-echo "Minions
mouse-1: Display minor modes menu" mouse-1: Display minor modes menu"
'mouse-face 'mode-line-highlight 'mouse-face 'mode-line-highlight
@ -946,7 +947,7 @@ mouse-1: Display minor modes menu"
" ") " ")
(propertize (propertize
(concat (format-mode-line `(:propertize ("" minor-mode-alist))) " ") (concat (format-mode-line `(:propertize ("" minor-mode-alist))) " ")
'face (if (doom-modeline--active) 'doom-modeline-buffer-minor-mode))))) 'face (if active 'doom-modeline-buffer-minor-mode))))))
;; ;;