From 64631d103ae6bf75b2ceb90ca13bcb6202f217e9 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Mon, 27 May 2019 00:25:08 +0800 Subject: [PATCH] Refactor. --- doom-modeline-segments.el | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index bdae97b..1038bec 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -685,26 +685,26 @@ Uses `all-the-icons-material' to fetch the icon." (`interrupted (doom-modeline-checker-icon "pause" "." 'doom-modeline-debug)) (`suspicious (doom-modeline-checker-icon "priority_high" "?" 'doom-modeline-urgent)) (_ nil)))) - (when icon - (propertize icon - 'help-echo (concat "Flycheck\n" - (pcase status - ('finished "mouse-1: Display minor mode menu + (propertize + icon + 'help-echo (concat "Flycheck\n" + (pcase status + ('finished "mouse-1: Display minor mode menu mouse-2: Show help for minor mode") - ('running "Running...") - ('no-checker "No Checker") - ('errored "Error") - ('interrupted "Interrupted") - ('suspicious "Suspicious"))) - 'mouse-face '(:box 0) - 'local-map (let ((map (make-sparse-keymap))) - (define-key map [mode-line down-mouse-1] - flycheck-mode-menu-map) - (define-key map [mode-line mouse-2] - (lambda () - (interactive) - (describe-function 'flycheck-mode))) - map)))))) + ('running "Running...") + ('no-checker "No Checker") + ('errored "Error") + ('interrupted "Interrupted") + ('suspicious "Suspicious"))) + 'mouse-face '(:box 0) + 'local-map (let ((map (make-sparse-keymap))) + (define-key map [mode-line down-mouse-1] + flycheck-mode-menu-map) + (define-key map [mode-line mouse-2] + (lambda () + (interactive) + (describe-function 'flycheck-mode))) + map))))) (add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-icon) (add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-icon)