mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
; Improve documentation of globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes): Document the subtlety with ':init-value t' for globalized modes.
This commit is contained in:
parent
704fab0452
commit
6d35c807e5
1 changed files with 11 additions and 1 deletions
|
|
@ -1861,7 +1861,17 @@ marking the @code{define-minor-mode} form as autoloaded.
|
|||
@item :init-value @var{init-value}
|
||||
This is the value to which the @var{mode} variable is initialized.
|
||||
Except in unusual circumstances (see below), this value must be
|
||||
@code{nil}.
|
||||
@code{nil}. If the mode is global (see below), and the initial value is
|
||||
@code{t}, i.e., the mode is turned on by default, you should consider
|
||||
forcing Emacs to run the mode function at startup, like this:
|
||||
|
||||
@lisp
|
||||
:initialize #'custom-initialize-delay
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
otherwise, the minor mode might not appear in the @file{*Help*} buffer
|
||||
generated by @kbd{C-h m} (@pxref{Mode Help}).
|
||||
|
||||
@item :lighter @var{lighter}
|
||||
The string @var{lighter} says what to display in the mode line
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue