From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: Should nil COLLECTION element mean a "nil" candidate for completing-read? Alist doc. Date: Wed, 22 Jul 2009 01:22:55 +0200 Message-ID: <87ljmhiptc.fsf@dd.chalmers.se> References: <5721FBADB175440B9BA3383934E0AC30@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248218605 23297 80.91.229.12 (21 Jul 2009 23:23:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jul 2009 23:23:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 22 01:23:19 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MTOg2-0005ek-RU for ged-emacs-devel@m.gmane.org; Wed, 22 Jul 2009 01:23:19 +0200 Original-Received: from localhost ([127.0.0.1]:49469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTOg1-0004Jd-R3 for ged-emacs-devel@m.gmane.org; Tue, 21 Jul 2009 19:23:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTOfx-0004JV-Mf for emacs-devel@gnu.org; Tue, 21 Jul 2009 19:23:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTOfs-0004H4-I2 for emacs-devel@gnu.org; Tue, 21 Jul 2009 19:23:12 -0400 Original-Received: from [199.232.76.173] (port=52217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTOfs-0004Gq-E5 for emacs-devel@gnu.org; Tue, 21 Jul 2009 19:23:08 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:32837 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTOfs-0003jd-3a for emacs-devel@gnu.org; Tue, 21 Jul 2009 19:23:08 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MTOfp-0000ie-Fh for emacs-devel@gnu.org; Tue, 21 Jul 2009 23:23:05 +0000 Original-Received: from c-accee455.04-211-6c6b701.cust.bredbandsbolaget.se ([85.228.206.172]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jul 2009 23:23:05 +0000 Original-Received: from bojohan+news by c-accee455.04-211-6c6b701.cust.bredbandsbolaget.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jul 2009 23:23:05 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-accee455.04-211-6c6b701.cust.bredbandsbolaget.se Mail-Copies-To: never User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:qM7MVzrQwblNA4JSdPhAaiY22Ss= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112963 Archived-At: Stefan Monnier writes: >> (completing-read "ff: " '(nil ("a") ("b))) > > A nil there is simply an error. We don't signal an error, but the > none of the behaviors you may see is considered as a feature. If COLLECTION is an alist (*note Association Lists::), the permissible completions are the elements of the alist that are either strings, symbols, or conses whose CAR is a string or symbol. Symbols are converted to strings using `symbol-name'. Other elements of the alist are ignored. (Remember that in Emacs Lisp, the elements of alists do not _have_ to be conses.) In particular, a list of strings or symbols is allowed, even though we usually do not think of such lists as alists. -- (info "(elisp) Basic Completion") (But this is not really true--the first element can't be a symbol other than nil (or lambda).)