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

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

Learners doubt in LISP


From: Rajsekar Manokaran
Subject: Learners doubt in LISP
Date: Thu, 08 Jan 2004 14:31:39 -0500
User-agent: Gnus/5.1005 (Gnus v5.10.5) Emacs/21.2.93 (gnu/linux)



I have just started learning lisp.
I use emacs (which was my motivation to learn LISP) to compile things.

There is a function in emacs called completing-read which when passed some
strings allows the user to select one string out of the many passed. I want to
allow the user select a string and then use the data associated with the
string.

eg.

(completing-read "Input: " '(("hai" 10) ("bye" 20)) nil t nil)

reads allowing completions hai and bye.

the nil t nil are insignificant (t - only allow things on the list).

Now this thing seems to return "bye" or "hai"
How do I access the 10 or 20 that comes together with it?

Thanks in advance.

M Rajsekar


reply via email to

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