Clarify define-minor-mode hooks

* doc/lispref/modes.texi (Defining Minor Modes): Note that the
code (and the hook) is run both when the mode is enabled and
disabled (bug#43868).
This commit is contained in:
Lars Ingebrigtsen 2020-10-09 06:36:53 +02:00
parent e2ece08273
commit 82d70d3aab

View file

@ -1729,7 +1729,8 @@ The command named @var{mode} first performs the standard actions such as
setting the variable named @var{mode} and then executes the @var{body}
forms, if any. It then runs the mode hook variable
@code{@var{mode}-hook} and finishes by evaluating any form in
@code{:after-hook}.
@code{:after-hook}. (Note that all of this, including running the
hook, is done both when the mode is enabled and disabled.)
@end defmac
The initial value must be @code{nil} except in cases where (1) the