1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00

(define-global-minor-mode): Use `after-change-major-mode-hook' instead

of `find-file-hook'.
This commit is contained in:
Luc Teirlinck 2005-05-22 22:07:22 +00:00
parent 5f90d77ec8
commit 7fb8093523

View file

@ -306,9 +306,9 @@ in which `%s' turns it on."
;; Setup hook to handle future mode changes and new buffers.
(if ,global-mode
(progn
(add-hook 'find-file-hook ',buffers)
(add-hook 'after-change-major-mode-hook ',buffers)
(add-hook 'change-major-mode-hook ',cmmh))
(remove-hook 'find-file-hook ',buffers)
(remove-hook 'after-change-major-mode-hook ',buffers)
(remove-hook 'change-major-mode-hook ',cmmh))
;; Go through existing buffers.