all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Vigouroux via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: using keyword arguments in define-minor-mode
Date: Sun, 06 Feb 2022 09:58:31 +0100	[thread overview]
Message-ID: <87tudc8j7s.fsf@laposte.net> (raw)
In-Reply-To: <87a6f6hi9b.fsf@gnu.org> (Tassilo Horn's message of "Fri, 04 Feb 2022 13:52:08 +0100")

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	other threads:[~2022-02-06  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 11:10 using keyword arguments in define-minor-mode goncholden via Users list for the GNU Emacs text editor
2022-02-04 11:38 ` Tassilo Horn
2022-02-04 11:51   ` goncholden
2022-02-04 12:52     ` Tassilo Horn
2022-02-06  8:58       ` Kevin Vigouroux via Users list for the GNU Emacs text editor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tudc8j7s.fsf@laposte.net \
    --to=help-gnu-emacs@gnu.org \
    --cc=ke.vigouroux@laposte.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.