all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
Date: Fri, 22 Jan 2016 12:58:19 +0100	[thread overview]
Message-ID: <874me5g71g.fsf@web.de> (raw)
In-Reply-To: <m2d1subffd.fsf@newartisans.com> (John Wiegley's message of "Thu,  21 Jan 2016 16:56:06 -0800")

John Wiegley <jwiegley@gmail.com> 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.



  parent reply	other threads:[~2016-01-22 11:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160116143238.27391.97533@vcs.savannah.gnu.org>
     [not found] ` <E1aKRuA-00078P-4T@vcs.savannah.gnu.org>
2016-01-19  9:53   ` emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get' Michael Heerdegen
2016-01-19 17:45     ` Eli Zaretskii
2016-01-19 17:59       ` John Wiegley
2016-01-20  7:31         ` Yuri Khan
2016-01-20  7:40           ` John Wiegley
2016-01-20  9:33           ` Eli Zaretskii
2016-01-19 18:01       ` Michael Heerdegen
2016-01-19 18:32         ` Eli Zaretskii
2016-01-19 18:42           ` John Wiegley
2016-01-19 19:06             ` Eli Zaretskii
2016-01-19 19:25             ` Michael Heerdegen
2016-01-19 19:33             ` Stefan Monnier
2016-01-19 18:52           ` Michael Heerdegen
2016-01-19 19:17             ` Eli Zaretskii
2016-01-19 19:34               ` Michael Heerdegen
2016-01-19 19:46                 ` Eli Zaretskii
2016-01-19 20:09                   ` John Wiegley
2016-01-20 12:14                     ` Michael Heerdegen
2016-01-20 14:11                       ` Stefan Monnier
2016-01-20 17:37                         ` Michael Heerdegen
2016-01-20 22:08                           ` Stefan Monnier
2016-01-21 17:44                             ` Michael Heerdegen
2016-01-21 18:00                               ` Eli Zaretskii
2016-01-21 18:26                                 ` Eli Zaretskii
2016-01-21 18:41                                   ` Michael Heerdegen
2016-01-22  0:56                                   ` John Wiegley
2016-01-22  7:07                                     ` Eli Zaretskii
2016-01-22  7:39                                       ` John Wiegley
2016-01-22 12:01                                         ` Michael Heerdegen
2016-01-22 17:50                                           ` John Wiegley
2016-01-22 19:07                                             ` Michael Heerdegen
2016-01-22 19:15                                               ` Michael Heerdegen
2016-01-22 19:52                                                 ` John Wiegley
2016-03-07 14:38                                             ` John Wiegley
2016-03-08  5:04                                               ` Stefan Monnier
2016-03-08 17:17                                                 ` John Wiegley
2016-01-22 20:07                                           ` Richard Stallman
2016-01-22 11:58                                     ` Michael Heerdegen [this message]
2016-01-19 20:17                 ` Drew Adams

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=874me5g71g.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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.