* how to make a selection box for input parameters?
@ 2003-06-06 20:26 szhu
0 siblings, 0 replies; 2+ messages in thread
From: szhu @ 2003-06-06 20:26 UTC (permalink / raw)
Hi, I'd like to write a command that takes one parameter, which comes from
a pre-defined list such as ("red","blue","yellow",etc.) Is there an easy interface to let the
user pick, e.g. use the up-down arrow key? (sort of like a drop-down selection box.)
Thanks.
Shunhui
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to make a selection box for input parameters?
[not found] <mailman.7500.1054931280.21513.help-gnu-emacs@gnu.org>
@ 2003-06-06 22:50 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2003-06-06 22:50 UTC (permalink / raw)
szhu@SonicWALL.com wrote:
> Hi, I'd like to write a command that takes one parameter, which comes from
> a pre-defined list such as ("red","blue","yellow",etc.) Is there an easy interface to let the
> user pick, e.g. use the up-down arrow key? (sort of like a drop-down selection box.)
Read the Completion nodes in the Emacs manual (under Minibuffer) and in the
Emacs Lisp manual (under Minibuffers), then try out this example:
(defun foo-bar (bar)
"Do foo to BAR."
(interactive (list (completing-read "Bar: " '(("red") ("blue") ("yellow"))
nil t)))
(foo bar))
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-06 22:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 20:26 how to make a selection box for input parameters? szhu
[not found] <mailman.7500.1054931280.21513.help-gnu-emacs@gnu.org>
2003-06-06 22:50 ` Kevin Rodgers
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.