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.
This commit is contained in:
parent
1baadbe060
commit
2f00a3435a
1 changed files with 5 additions and 4 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue