From: Drew Adams <drew.adams@oracle.com>
To: Random832 <random832@fastmail.com>, 21709@debbugs.gnu.org
Subject: bug#21709: 25.0.50; doc of :variable in `define-minor-mode'
Date: Mon, 19 Oct 2015 10:52:10 -0700 (PDT) [thread overview]
Message-ID: <f9712d1b-9454-4a4a-971c-1390c5080702@default> (raw)
In-Reply-To: <87si567qk1.fsf@fastmail.com>
> A state could be a single variable, it could be a dozen variables, it
> could be a file on the disk [which GET reads and SET writes] - the point
> is to have an abstraction that doesn't care what it is.
OK; right. In that case there is still no reason to speak of a "state".
In that case, the GET sexp can do *anything* and so can the SET function.
> Seems like what it really is is a "hackish" way to define a generalized
> variable without actually defining one. A sort of "generalized variable
> lambda" except for the fact that setf doesn't actually support it.
Yup, and not made clear by the doc.
(FWIW, grepping the Emacs Lisp sources, it seems that a non-variable
PLACE is used only a few times.)
And perhaps this should be mentioned in the doc: Using :variable prevents
`d-m-m' from defining the variable again, if it was already defined by
C code. This idiom is used several times in the Emacs Lisp source code.
E.g.: (define-minor-mode abbrev-mode "..." :variable abbrev-mode)
next prev parent reply other threads:[~2015-10-19 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 15:14 bug#21709: 25.0.50; doc of :variable in `define-minor-mode' Drew Adams
2015-10-19 16:48 ` Random832
2015-10-19 17:52 ` Drew Adams [this message]
2021-08-16 12:22 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9712d1b-9454-4a4a-971c-1390c5080702@default \
--to=drew.adams@oracle.com \
--cc=21709@debbugs.gnu.org \
--cc=random832@fastmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).