diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-02-14 16:51:14 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-02-14 16:51:14 +0100 |
commit | 2f00a3435a05bbcedbf8851baeefd33463bc525b (patch) | |
tree | a8614ee132266189e9b3ed7202e59b6aeaf06727 | |
parent | 1baadbe060f392253bb4a54ddbdd3870f1d08459 (diff) | |
download | emacs-2f00a3435a05bbcedbf8851baeefd33463bc525b.tar.gz |
Don't update `minor-modes' in global modes
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): There's no
point in setting the buffer-local `minor-modes' in global modes.
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 7e5e2a9b8a9..5ba0d2187f2 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -330,10 +330,11 @@ 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)) + (unless ,globalp + ;; 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)) |