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

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

Re: completing-read


From: lee
Subject: Re: completing-read
Date: Thu, 29 May 2014 03:54:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

drain <aeuster@gmail.com> writes:

> I'm curious what the numbers passed to the completing-read function are
> used for. Here is the example I found online:
>
> (completing-read
>  "Complete a foo: "
>  '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))
>  nil t "fo")
>
> This function appears to work fine without the 1, 2, 3, 4.

Shouldn`t that, nowadays, be more like '(("foobar1" . 1) ...'?

So you cannot create a list like this (anymore)?

But it works here:


,----
| *** Welcome to IELM ***  Type (describe-mode) for help.
| ELISP>  (completing-read
|   "Complete a foo: "
|   '(("foobar1" 1) ("barfoo" 2) ("foobaz" 3) ("foobar2" 4))
|   nil t "fo")
| "foobar1"
| ELISP> 
`----


-- 
Knowledge is volatile and fluid.  Software is power.



reply via email to

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