bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: completing-read


From: Drew Adams
Subject: RE: completing-read
Date: Mon, 19 Feb 2007 09:46:49 -0800

> The following code exhibits a behavior of completing-read that I
> would call a bug.  Or am I missing something?
>
> (let ((table '((foo . "you selected foo")
>                (foobar . "you selected foobar"))))
>   (completing-read "Symbol: " table nil 'require-match))
>
> The unexpected behavior is that it is impossible to select `foo'.

You need to use strings, not symbols, if you use an ALIST second argument to
`completing-read':

(let ((table '(("foo" . "you selected foo")
               ("foobar" . "you selected foobar"))))
  (completing-read "Symbol: " table nil 'require-match))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]