(define-globalized-minor-mode): Fix bug#58888
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode) <MODE-cmhh>: Try and detect well-behaved modes so they're not affected by those which require the cmhh hack.
This commit is contained in:
parent
d67e08d6c3
commit
3f7e26e2be
1 changed files with 6 additions and 2 deletions
|
@ -661,8 +661,12 @@ list."
|
|||
|
||||
;; The function that catches kill-all-local-variables.
|
||||
(defun ,MODE-cmhh ()
|
||||
(add-to-list ',MODE-buffers (current-buffer))
|
||||
(add-hook 'post-command-hook #',MODE-check-buffers))
|
||||
;; If `delay-mode-hooks' is set, it indicates that the current
|
||||
;; buffer's mode will run `run-mode-hooks' afterwards anyway,
|
||||
;; so we don't need to keep this buffer in MODE-buffers.
|
||||
(unless delay-mode-hooks
|
||||
(add-to-list ',MODE-buffers (current-buffer))
|
||||
(add-hook 'post-command-hook #',MODE-check-buffers)))
|
||||
(put ',MODE-cmhh 'definition-name ',global-mode))))
|
||||
|
||||
(defun easy-mmode--globalized-predicate-p (predicate)
|
||||
|
|
Loading…
Add table
Reference in a new issue