emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Docu


From: Michael Heerdegen
Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
Date: Fri, 22 Jan 2016 12:58:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

John Wiegley <address@hidden> writes:

> >> > (defmacro alist-put (key value place &optional default remove)
> >> >   (gv-letplace (_ setter) `(alist-get ,key ,place ,default ,remove)
> >> >     (funcall setter value)))

> I hear you.  For that code above, the comment would be:
>
>     Given an expression -- in this case, `alist-get' applied to the
>     arguments passed to this macro -- find the `setter' that can
>     "modify in place" the object returned by that expression, and
>     immediately use it to replace that object with the value passed by
>     the caller.

Not quite, or at least imprecise: SETTER is a function that is called
with an expression, and returns the code that does what you describe.

Note that there is no backquote used in the above definition of
`alist-put'.

So, strictly speaking, the name "setter" is not 100% correct.


Michael.



reply via email to

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