aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-04 19:51:54 +1100
committerLars Ingebrigtsen2016-02-04 19:52:07 +1100
commit4531b03ec98b50fc61baad2b75f6faf439894583 (patch)
tree480bd9f181799d8cf9dba26860360b57131820b9 /doc
parentd95c7bb472cd259661dfed41ccfe534f9026c826 (diff)
downloademacs-4531b03ec98b50fc61baad2b75f6faf439894583.tar.gz
emacs-4531b03ec98b50fc61baad2b75f6faf439894583.zip
New function read-multiple-choice
* doc/lispref/commands.texi (Reading One Event): Document read-multiple-choice. * lisp/faces.el (read-multiple-choice-face): New face. * lisp/subr.el (read-multiple-choice): New function.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/commands.texi21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 9c1df895161..1964ec8e3fe 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -2617,6 +2617,27 @@ causes it to evaluate @code{help-form} and display the result. It
2617then continues to wait for a valid input character, or keyboard-quit. 2617then continues to wait for a valid input character, or keyboard-quit.
2618@end defun 2618@end defun
2619 2619
2620@defun read-multiple-choice prompt choices
2621Ask user a multiple choice question. @var{prompt} should be a string
2622that will be displayed as the prompt.
2623
2624@var{choices} is an alist where the first element in each entry is a
2625character to be entered, the second element is a short name for the
2626entry to be displayed while prompting (if there's room, it might be
2627shortened), and the third, optional entry is a longer explanation that
2628will be displayed in a help buffer if the user requests more help.
2629
2630The return value is the matching value from @var{choices}.
2631
2632@lisp
2633(read-multiple-choice
2634 "Continue connecting?"
2635 '((?a "always" "Accept this certificate this session and for all future sessions.")
2636 (?s "session only" "Accept this certificate this session only.")
2637 (?n "no" "Refuse to use this certificate, and close the connection.")))
2638@end lisp
2639@end defun
2640
2620@node Event Mod 2641@node Event Mod
2621@subsection Modifying and Translating Input Events 2642@subsection Modifying and Translating Input Events
2622@cindex modifiers of events 2643@cindex modifiers of events