Refactor.

This commit is contained in:
Vincent Zhang 2019-05-27 00:25:08 +08:00
parent c5226e4aae
commit 64631d103a

View file

@ -685,8 +685,8 @@ Uses `all-the-icons-material' to fetch the icon."
(`interrupted (doom-modeline-checker-icon "pause" "." 'doom-modeline-debug)) (`interrupted (doom-modeline-checker-icon "pause" "." 'doom-modeline-debug))
(`suspicious (doom-modeline-checker-icon "priority_high" "?" 'doom-modeline-urgent)) (`suspicious (doom-modeline-checker-icon "priority_high" "?" 'doom-modeline-urgent))
(_ nil)))) (_ nil))))
(when icon (propertize
(propertize icon icon
'help-echo (concat "Flycheck\n" 'help-echo (concat "Flycheck\n"
(pcase status (pcase status
('finished "mouse-1: Display minor mode menu ('finished "mouse-1: Display minor mode menu
@ -704,7 +704,7 @@ mouse-2: Show help for minor mode")
(lambda () (lambda ()
(interactive) (interactive)
(describe-function 'flycheck-mode))) (describe-function 'flycheck-mode)))
map)))))) map)))))
(add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-icon) (add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-icon)
(add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-icon) (add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-icon)