From: Lars Ingebrigtsen Date: Fri, 9 Oct 2020 04:36:53 +0000 (+0200) Subject: Clarify define-minor-mode hooks X-Git-Tag: emacs-28.0.90~5708 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82d70d3aab7ae25beb089b3d6bb9415867db317b;p=emacs.git 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). --- diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index be2ee5721c2..41c86d69abf 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -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