From: Drew Adams <drew.adams@oracle.com>
To: "Basil L. Contovounesios" <contovob@tcd.ie>,
Damien Cassou <damien@cassou.me>
Cc: 31628@debbugs.gnu.org
Subject: bug#31628: 26.1; Problem in read-multiple-choice's docstring
Date: Tue, 29 May 2018 06:49:37 -0700 (PDT) [thread overview]
Message-ID: <17f558ca-75b4-4787-ad48-b99559598b6a@default> (raw)
In-Reply-To: <877enn64de.fsf@tcd.ie>
> Technically, a list of (A B C) is as much an alist as a list of (A . B),
> but I agree that the docstring can be clarified a bit.
No - assuming you mean that A, B, and C are elements of the
list and they are atoms, not cons cells.
From (elisp) `Association Lists':
It is a list of cons cells called "associations": the CAR of
each cons cell is the "key", and the CDR is the "associated
value".
Alist elements are cons cells, in Emacs Lisp as in other
Lisps.
It's true that functions that look up an association do not
raise an error if a list element is not a cons.
In Emacs Lisp, it is _not_ an error if an element of an
association list is not a cons cell. The alist search
functions simply ignore such elements. Many other versions
of Lisp signal errors in such cases.
Ignoring such elements, like raising an error for such an
element, does not mean that such an element is an
association or that an alist is just any old list.
And yes, there is even one function, `assoc-default', that
treats an atomic list element as if it were an association.
IOW, `assoc-default' works with any list, not just with alists.
next prev parent reply other threads:[~2018-05-29 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 15:23 bug#31628: 26.1; Problem in read-multiple-choice's docstring Damien Cassou
2018-05-28 18:07 ` Basil L. Contovounesios
2018-05-29 6:04 ` Damien Cassou
2018-05-29 12:18 ` Noam Postavsky
2018-05-29 13:49 ` Drew Adams [this message]
2018-05-29 16:39 ` Basil L. Contovounesios
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=17f558ca-75b4-4787-ad48-b99559598b6a@default \
--to=drew.adams@oracle.com \
--cc=31628@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=damien@cassou.me \
/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.