From: John Wiegley <jwiegley@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
Date: Tue, 19 Jan 2016 10:42:57 -0800 [thread overview]
Message-ID: <m24me9mmvi.fsf@newartisans.com> (raw)
In-Reply-To: <83h9i9besq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Jan 2016 20:32:53 +0200")
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
> Isn't 'cdr' also in that class? As well as at least a few others?
We have setcdr.
> AFAIU, this function just saves you from the need to repeatedly test the
> value returned by assq before using it, that's all.
The old way:
GET: (cdr (assq key my-alist))
SET: (setcdr (assq key my-alist) new-value)
The new hotness:
GET: (alist-get key my-alist)
SET: (setf (alist-get key my-alist) new-value)
So... not actually a whole lot of difference. I'm not sure if this is exciting
enough to need advertisement in a docstring. But in the elisp manual, sure.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
next prev parent reply other threads:[~2016-01-19 18:42 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 [this message]
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
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=m24me9mmvi.fsf@newartisans.com \
--to=jwiegley@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=johnw@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
/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.