From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: About the `:variable' keyword in `define-minor-mode'
Date: Thu, 14 Feb 2013 10:02:32 -0500 [thread overview]
Message-ID: <jwvhalfkkjc.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 20130214223735.edcdea25b5a4ed018be3baca@gmail.com
> In the docstring of `define-minor-mode':
> [...]
> :variable PLACE [...]
> 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.
> I don't understand the meaning of GET. The docstring says it returns
> the current state, but where will it return?
It will return it to the context?
The following expression:
(+ 1 2)
is an expression that returns 3, and we don't care where it returns
it, really.
Does this explanation help?
Stefan
next prev parent reply other threads:[~2013-02-14 15:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 14:37 About the `:variable' keyword in `define-minor-mode' Xue Fuqiao
2013-02-14 15:02 ` Stefan Monnier [this message]
[not found] ` <mailman.19937.1360854183.855.help-gnu-emacs@gnu.org>
2013-02-14 15:53 ` Michael Heerdegen
2013-02-14 15:53 ` Michael Heerdegen
-- strict thread matches above, loose matches on Subject: below --
2013-02-14 23:50 Xue Fuqiao
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=jwvhalfkkjc.fsf-monnier+gmane.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/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.