summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 2916ae4adea..bfffbe4bf20 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -317,6 +317,10 @@ or call the function `%s'."))))
nil)
(t
t)))
+ ;; Keep `minor-modes' up to date.
+ (setq minor-modes (delq ',modefun minor-modes))
+ (when ,getter
+ (push ',modefun minor-modes))
,@body
;; The on/off hooks are here for backward compatibility only.
(run-hooks ',hook (if ,getter ',hook-on ',hook-off))