summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2023-03-29 06:30:09 +0200
committerStefan Kangas <stefankangas@gmail.com>2023-03-29 06:30:09 +0200
commitf24aa0f46af1f808aa051fdbb44876a1141c928c (patch)
tree6373e545cd21ef33584529de9d2c9bd90016bed0 /doc
parent2002ac376c97382cace161ef0832a6faf6f376e8 (diff)
parent3965c65d5e28e0efdfa693046f6a2059e74465f9 (diff)
downloademacs-f24aa0f46af1f808aa051fdbb44876a1141c928c.tar.gz
Merge from origin/emacs-29
3965c65d5e2 ; * lisp/subr.el (read-char-choice): Fix last change. c1eac5b6586 Improve documentation of 'read-choice' and related symbols a8c9283e170 Revert "Comp fix calls to redefined primtives with op-byt... 8b66d8abd01 Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-sub... 4ec4f614c71 ; Fix incompatibility in 'display-buffer-assq-regexp' ba3ade58f3b Skip ruby-ts-imenu-index test if needed 9133446db87 Fix Eglot Tramp tests on EMBA 5b351bc7fa9 * test/infra/Dockerfile.emba (emacs-gnustep): Instrument ...
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/commands.texi25
1 files changed, 17 insertions, 8 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 20be706bebd..62a0939a47e 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -3215,15 +3215,24 @@ unspecified, the only fallback disabled is downcasing of the last
event.
@end defun
+@vindex read-char-choice-use-read-key
@defun read-char-choice prompt chars &optional inhibit-quit
-This function uses @code{read-key} to read and return a single
-character. It ignores any input that is not a member of @var{chars},
-a list of accepted characters. Optionally, it will also ignore
-keyboard-quit events while it is waiting for valid input. If you bind
-@code{help-form} (@pxref{Help Functions}) to a non-@code{nil} value
-while calling @code{read-char-choice}, then pressing @code{help-char}
-causes it to evaluate @code{help-form} and display the result. It
-then continues to wait for a valid input character, or keyboard-quit.
+This function uses @code{read-from-minibuffer} to read and return a
+single character that is a member of @var{chars}, which should be a
+list of single characters. It discards any input characters that are
+not members of @var{chars}, and shows a message to that effect.
+
+The optional argument @var{inhibit-quit} is by default ignored, but if
+the variable @code{read-char-choice-use-read-key} is non-@code{nil},
+this function uses @code{read-key} instead of
+@code{read-from-minibuffer}, and in that case @var{inhibit-quit}
+non-@code{nil} means ignore keyboard-quit events while waiting for
+valid input. In addition, if @code{read-char-choice-use-read-key} is
+non-@code{nil}, binding @code{help-form} (@pxref{Help Functions}) to a
+non-@code{nil} value while calling this function causes it to evaluate
+@code{help-form} and display the result when the user presses
+@code{help-char}; it then continues to wait for a valid input
+character, or for keyboard-quit.
@end defun
@defun read-multiple-choice prompt choices &optional help-string show-help long-form