summaryrefslogtreecommitdiff
path: root/doc/lispref/minibuf.texi
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2020-11-21 21:49:46 +0200
committerJuri Linkov <juri@linkov.net>2020-11-21 21:49:46 +0200
commit0a8cd0116204354e95fbb4ebde64c58123502aa2 (patch)
tree3111349cc32718d7493645b4bd0c381df748ed83 /doc/lispref/minibuf.texi
parent789ee3e1d55a86b9ce38d1374c0e01d04f97eb7d (diff)
downloademacs-0a8cd0116204354e95fbb4ebde64c58123502aa2.tar.gz
Handle help-form in y-or-n-p and use this in find-file-noselect (bug#5423)
* doc/lispref/help.texi (Help Functions): Mention help-form for read-char-from-minibuffer and y-or-n-p. * doc/lispref/minibuf.texi (Yes-or-No Queries): Mention help-form for y-or-n-p. (Multiple Queries): Mention help-form for read-char-from-minibuffer. * lisp/files.el (find-file-noselect): Let-bind multi-line help text to help-form for y-or-n-p. * lisp/subr.el (read-char-choice): Mention help-form in docstring. (read-char-from-minibuffer): Mention help-form in docstring. (y-or-n-p-map): Remove handling of 'help'. (y-or-n-p): Mention help-form in docstring. When help-form is non-nil: add help-char to 'prompt', and bind help-char to help-form-show in composed-keymap.
Diffstat (limited to 'doc/lispref/minibuf.texi')
-rw-r--r--doc/lispref/minibuf.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index b6a3434d15e..f1cfd29ef14 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2109,6 +2109,11 @@ special responses @code{recenter}, @code{scroll-up},
@kbd{C-v}, @kbd{M-v}, @kbd{C-M-v} and @kbd{C-M-S-v} in
@code{query-replace-map}), this function performs the specified window
recentering or scrolling operation, and poses the question again.
+
+If you bind @code{help-form} (@pxref{Help Functions}) to
+a non-@code{nil} value while calling @code{y-or-n-p}, then pressing
+@code{help-char} causes it to evaluate @code{help-form} and display
+the result. @code{help-char} is automatically added to @var{prompt}.
@end defun
@defun y-or-n-p-with-timeout prompt seconds default
@@ -2317,6 +2322,11 @@ character. Optionally, it ignores any input that is not a member of
@var{chars}, a list of accepted characters. The @var{history}
argument specifies the history list symbol to use; if it is omitted or
@code{nil}, this function doesn't use the history.
+
+If you bind @code{help-form} (@pxref{Help Functions}) to
+a non-@code{nil} value while calling @code{read-char-from-minibuffer},
+then pressing @code{help-char} causes it to evaluate @code{help-form}
+and display the result.
@end defun
@node Reading a Password