1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-31 01:32:00 -07:00

Fix Rmail behavior wrt globalized minor modes

Previously, "M-x rmail" would not call 'run-mode-hooks', which
didn't let globalized minor modes a chance to turn on themselves
in Rmail buffers.  This modifies the way Rmail runs the various
hooks so as to abide by behavior required by Emacs 30 and later.
* lisp/mail/rmail.el (rmail-mode-2): Call 'run-mode-hooks'.
(rmail-mode): Call 'run-hooks', not 'run-mode-hooks'.  Suggested
by Mark Lillibridge <mdl@alum.mit.edu>.  (Bug#80879)
This commit is contained in:
Eli Zaretskii 2026-05-09 12:01:07 +03:00
parent 6ba05106f4
commit 547b1ee7b6

View file

@ -1328,13 +1328,14 @@ Instead, these commands are available:
(when rmail-display-summary
(rmail-summary))
(rmail-construct-io-menu))
(run-mode-hooks 'rmail-mode-hook)))
(run-hooks 'rmail-mode-hook)))
(defun rmail-mode-2 ()
(kill-all-local-variables)
(rmail-mode-1)
(rmail-perm-variables)
(rmail-variables))
(rmail-variables)
(run-mode-hooks))
(defun rmail-mode-1 ()
(setq major-mode 'rmail-mode)