; Clarify documentation of 'define-globalized-minor-mode'

* doc/lispref/modes.texi (Defining Minor Modes): Clarify ':global'
vs 'define-globalized-minor-mode'.  (Bug#81338)
This commit is contained in:
Eli Zaretskii 2026-07-11 11:18:52 +03:00
parent 9ebc5b9d93
commit af7f189e0a

View file

@ -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