emacs-31 af7f189e0ae: ; Clarify documentation of 'define-globalized-minor-mode'
Eli Zaretskii <[email protected]> Sat, 11 Jul 2026 04:20:05 -0400 (EDT)
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit af7f189e0ae6b43ffd4884543aaff7a5e3e22914 Author: Eli Zaretskii <[email protected]> Commit: Eli Zaretskii <[email protected]> ; Clarify documentation of 'define-globalized-minor-mode' * doc/lispref/modes.texi (Defining Minor Modes): Clarify ':global' vs 'define-globalized-minor-mode'. (Bug#81338) --- doc/lispref/modes.texi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index a2cc2198108..28c12e35207 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2004,6 +2004,11 @@ turn on the minor mode in a buffer, it uses the function function so it could determine whether to enable the minor mode or not when it is not a priori clear that it should always be enabled.) +Note that this is different from using @code{define-minor-mode} with the +@code{:global} keyword non-@code{nil}, in that the mode defined by this +macro is still buffer-local, it is just enabled in all (or some) +buffers. + Globally enabling the mode affects only those buffers subsequently created that use a major mode which follows the convention to run @code{run-mode-hooks}. The minor mode will not be enabled in those