From 1f6ce7201597b84c646280ca7fe838498319c3be Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 12 Jan 2022 19:42:13 +0800 Subject: modeline: silence keycast when deactivated * modeline.el (modeline-format-keycast): Previously there was a bug that the last key cast message will still appear on the mode line after durand-keycase-mode has been deactivated. Now this is fixed. --- modeline.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modeline.el b/modeline.el index b244463..804442e 100644 --- a/modeline.el +++ b/modeline.el @@ -371,14 +371,16 @@ mouse-3: Toggle minor modes" (defun modeline-format-keycast () "Format the keycast information." (declare (side-effect-free t)) - (modeline-propertize - (format-mode-line mode-line-keycast) - nil - "Minor mode + (cond + (durand-keycast-mode + (modeline-propertize + (format-mode-line mode-line-keycast) + nil + "Minor mode mouse-1: Display minor mode menu mouse-2: Show help for minor mode mouse-3: Toggle minor modes" - mode-line-minor-mode-keymap)) + mode-line-minor-mode-keymap)))) ;;; NOTE: The minor mode menu does not work with my custom mode line. -- cgit v1.2.3-18-g5258