all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: emacs-devel@gnu.org
Subject: Re: Should nil COLLECTION element mean a "nil" candidate for completing-read? Alist doc.
Date: Wed, 22 Jul 2009 01:22:55 +0200	[thread overview]
Message-ID: <87ljmhiptc.fsf@dd.chalmers.se> (raw)
In-Reply-To: jwvtz16rx1l.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> 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).)






  parent reply	other threads:[~2009-07-21 23:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21  3:20 Should nil COLLECTION element mean a "nil" candidate for completing-read? Alist doc Drew Adams
2009-07-21  3:40 ` Should nil COLLECTION element mean a "nil" candidate forcompleting-read? " Drew Adams
2009-07-21 15:48   ` Stefan Monnier
2009-07-22  0:07     ` Should nil COLLECTION element mean a "nil" candidateforcompleting-read? " Drew Adams
2009-07-22  3:15       ` Stefan Monnier
2009-07-21 13:23 ` Should nil COLLECTION element mean a "nil" candidate for completing-read? " Stefan Monnier
2009-07-21 14:51   ` Drew Adams
2009-07-21 15:55     ` Stefan Monnier
2009-07-22  0:07       ` Drew Adams
2009-07-22  3:24         ` Stefan Monnier
2009-07-28  4:26         ` Kevin Rodgers
2009-07-21 23:22   ` Johan Bockgård [this message]
2009-07-22  0:07     ` Should nil COLLECTION element mean a "nil" candidate forcompleting-read? " 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=87ljmhiptc.fsf@dd.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    --cc=emacs-devel@gnu.org \
    /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.