unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21709: 25.0.50; doc of :variable in `define-minor-mode'
@ 2015-10-19 15:14 Drew Adams
  2015-10-19 16:48 ` Random832
  2021-08-16 12:22 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2015-10-19 15:14 UTC (permalink / raw)
  To: 21709

The doc is unclear - both the doc string and (elisp) `Defining Minor
Modes'.  Specifically, the part about PLACE being (GET . SET).

 PLACE can also be of the form (GET . SET), where GET is
 an expression that returns the current state, and SET is
 a function that takes one argument, the new state, and
 sets it.

 PLACE can also be a cons '(GET . SET)', where GET is an expression that
 returns the current state, and SET is a function of one argument (a
 state) that sets it.

Surely the function does not "set" a "state".  It might set the
variable to a new value (but it does not "set" the value).

What is the function argument?  A "state"?  What does that mean?
State of what?  What form does this "state" take?  What does it do?

My guess is that the doc should says something like this:

 The argument is the new variable value, which is assigned to PLACE.

Presumably, "state" should be replaced by "value" everywhere, here.
But that's just a guess.

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2015-10-09
Bzr revision: af45926d66d303fdc4c2c3ebbc820b4a54d9e4a0
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --host=i686-pc-mingw32 --enable-checking=yes,glyphs'





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-16 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-08-16 12:22 ` Lars Ingebrigtsen

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).