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

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

Get a list with edit-and-eval-command


From: david . chappaz
Subject: Get a list with edit-and-eval-command
Date: Sun, 12 Feb 2012 17:25:15 +0100 (CET)

Hi all,

I'm trying to get an elisp object (more specifically a list) from the 
minibuffer, using the function edit-and-eval-command, as documented in
http://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Object-from-Minibuffer

For example say I first evaluate:
(setq wildcard '("*.c" "*.h" "*.v"))

Next I am trying to do something like:
(setq newwildcard (edit-and-eval-command  "Enter an expression: " (format "%s" 
wildcard))

but it does not achieves what I really want, which is to provide as initial 
argument a valid lisp list [e.g. '("*.c" "*.h" "*.v")] so no error is generated 
if the user simply hits [Enter]. The above generates double quotes and misses 
the single quote, which causes the problem.

Can anyone give me some insight to do this properly ?

Many thanks,
David.



reply via email to

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