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

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

Re: About the `:variable' keyword in `define-minor-mode'


From: Stefan Monnier
Subject: Re: About the `:variable' keyword in `define-minor-mode'
Date: Thu, 14 Feb 2013 10:02:32 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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




reply via email to

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