[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should nil COLLECTION element mean a "nil" candidate for completing-
Re: Should nil COLLECTION element mean a "nil" candidate for completing-read? Alist doc.
Wed, 22 Jul 2009 01:22:55 +0200
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)
Stefan Monnier <address@hidden> 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).)
Re: Should nil COLLECTION element mean a "nil" candidate for completing-read? Alist doc.,
Johan Bockgård <=