mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Make it possible to locally disable a globally enabled mode.
* simple.el (fundamental-mode): Run fundamental-mode-hook. * emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode rather than kill-all-local-variables so it runs fundamental-mode-hook. * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so that subsequent hooks get a chance to disable it.
This commit is contained in:
parent
106c6f7432
commit
56924d996f
4 changed files with 14 additions and 3 deletions
|
|
@ -338,9 +338,11 @@ See `%s' for more information on %s."
|
|||
(progn
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
',MODE-enable-in-buffers)
|
||||
(add-hook 'fundamental-mode-hook ',MODE-enable-in-buffers)
|
||||
(add-hook 'find-file-hook ',MODE-check-buffers)
|
||||
(add-hook 'change-major-mode-hook ',MODE-cmhh))
|
||||
(remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
|
||||
(remove-hook 'fundamental-mode-hook ',MODE-enable-in-buffers)
|
||||
(remove-hook 'find-file-hook ',MODE-check-buffers)
|
||||
(remove-hook 'change-major-mode-hook ',MODE-cmhh))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue