From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#31628: 26.1; Problem in read-multiple-choice's docstring Date: Tue, 29 May 2018 06:49:37 -0700 (PDT) Message-ID: <17f558ca-75b4-4787-ad48-b99559598b6a@default> References: <87lgc3pzxf.fsf@cassou.me> <877enn64de.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527601750 2987 195.159.176.226 (29 May 2018 13:49:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 May 2018 13:49:10 +0000 (UTC) Cc: 31628@debbugs.gnu.org To: "Basil L. Contovounesios" , Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 29 15:49:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNezo-0000de-Et for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2018 15:49:04 +0200 Original-Received: from localhost ([::1]:33145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNf1v-0008OI-Hn for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2018 09:51:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNf1l-0008Nt-Vo for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:51:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNf1i-0005pG-T0 for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:51:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45417) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNf1i-0005p6-Oz for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fNf1i-0005Yj-Gb for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 May 2018 13:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31628 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 31628-submit@debbugs.gnu.org id=B31628.152760180221284 (code B ref 31628); Tue, 29 May 2018 13:51:01 +0000 Original-Received: (at 31628) by debbugs.gnu.org; 29 May 2018 13:50:02 +0000 Original-Received: from localhost ([127.0.0.1]:53314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNf0j-0005X6-Gn for submit@debbugs.gnu.org; Tue, 29 May 2018 09:50:01 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:43616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNf0h-0005Wt-D1 for 31628@debbugs.gnu.org; Tue, 29 May 2018 09:49:59 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4TDk16p092209; Tue, 29 May 2018 13:49:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=yU2xFTtV5R3MqnXiiFDfL7KuBAWtEka99eNoKHykaZw=; b=lQN6V/Vm5Se1Zaranh/8CdEOEYkzMlUFqsHPjhsiw4yQzXQEvzXyXlo4xjf67kbJQo30 Evdf+IctlAC8ciWOQ9v29TxcJO7NpA3wN1gvqKwxy7cgPJ/Cybeg2EYinOCJNUy0B9Xz JLX4kHUnE8E84afKptLX1tY0NlsrfTiFM5KAzWktRODhaZ4W7s4M/W6hCj2che9trkN1 KEQmQD5YtiONfR/J2Y/GpyHbr/QbMBzc1Qa7HYRB7WEALxzWd9wfSwQT93MS0PErFJh3 I1yEppDhm2NMmNcry9KHd7Ed7eO7CAASfislAgf/DEiZ+o68YQ3YjFYblJDvp3BHxyhf Lw== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2j6w42hkc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 May 2018 13:49:43 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4TDnfgx025951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 May 2018 13:49:42 GMT Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4TDne2V012707; Tue, 29 May 2018 13:49:41 GMT In-Reply-To: <877enn64de.fsf@tcd.ie> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8907 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=848 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805290158 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146697 Archived-At: > 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.