help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using keyword arguments in define-minor-mode


From: Kevin Vigouroux
Subject: Re: using keyword arguments in define-minor-mode
Date: Sun, 06 Feb 2022 09:58:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

I don’t know if it’s enough to look at the docstring of
`define-minor-mode' when things are new.

• Emacs Lisp Ref. manual, section 23.3.3 “Defining Minor Modes”
- 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Minor-Modes.html

#+begin_quote
By default, it also defines a variable named MODE, which is set to ‘t’
or ‘nil’ by enabling or disabling the mode. The variable is initialized
to INIT-VALUE. Except in unusual circumstances (see below), this value
must be ‘nil’.
#+end_quote

#+begin_quote
The initial value must be ‘nil’ except in cases where (1) the mode is
preloaded in Emacs, or (2) it is painless for loading to enable the mode
even though the user did not request it. For instance, if the mode has
no effect unless something else is enabled, and will always be loaded by
that time, enabling it by default is harmless. But these are unusual
circumstances. Normally, the initial value must be ‘nil’.
#+end_quote
-- 
Kevin Vigouroux
Best regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]