diff options
| author | Lars Ingebrigtsen | 2022-04-07 13:37:16 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-07 13:37:16 +0200 |
| commit | 4c8e23d5d7fb662dc9eefba67b52ae5df0dffe62 (patch) | |
| tree | 162e69aef91031af6f97870d7f8bc1f9d8bd0e07 | |
| parent | d859cdd62157b3489ca893a54a4d7a6400cfae2c (diff) | |
| download | emacs-4c8e23d5d7fb662dc9eefba67b52ae5df0dffe62.tar.gz emacs-4c8e23d5d7fb662dc9eefba67b52ae5df0dffe62.zip | |
Clarify read-answer-short/use-short-answers action
* lisp/emacs-lisp/map-ynp.el (read-answer-short): Clarify what
this variable affects (bug#54754).
* src/fns.c (Fyes_or_no_p): Mention `use-short-answers'.
| -rw-r--r-- | lisp/emacs-lisp/map-ynp.el | 10 | ||||
| -rw-r--r-- | src/fns.c | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index b3e7fca4781..c47025f8846 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el | |||
| @@ -278,11 +278,17 @@ Type \\`SPC' or \\`y' to %s the current %s; | |||
| 278 | 278 | ||
| 279 | ;; For backward compatibility check if short y/n answers are preferred. | 279 | ;; For backward compatibility check if short y/n answers are preferred. |
| 280 | (defcustom read-answer-short 'auto | 280 | (defcustom read-answer-short 'auto |
| 281 | "If non-nil, `read-answer' accepts single-character answers. | 281 | "If non-nil, the `read-answer' function accepts single-character answers. |
| 282 | If t, accept short (single key-press) answers to the question. | 282 | If t, accept short (single key-press) answers to the question. |
| 283 | If nil, require long answers. If `auto', accept short answers if | 283 | If nil, require long answers. If `auto', accept short answers if |
| 284 | `use-short-answers' is non-nil, or the function cell of `yes-or-no-p' | 284 | `use-short-answers' is non-nil, or the function cell of `yes-or-no-p' |
| 285 | is set to `y-or-n-p'." | 285 | is set to `y-or-n-p'. |
| 286 | |||
| 287 | Note that this variable does not affect calls to the more | ||
| 288 | commonly-used `yes-or-no-p' function; it only affects calls to | ||
| 289 | the `read-answer' function. To control whether `yes-or-no-p' | ||
| 290 | requires a long or a short answer, see the `use-short-answers' | ||
| 291 | variable." | ||
| 286 | :type '(choice (const :tag "Accept short answers" t) | 292 | :type '(choice (const :tag "Accept short answers" t) |
| 287 | (const :tag "Require long answer" nil) | 293 | (const :tag "Require long answer" nil) |
| 288 | (const :tag "Guess preference" auto)) | 294 | (const :tag "Guess preference" auto)) |
| @@ -2915,6 +2915,9 @@ it does up to one space will be removed. | |||
| 2915 | The user must confirm the answer with RET, and can edit it until it | 2915 | The user must confirm the answer with RET, and can edit it until it |
| 2916 | has been confirmed. | 2916 | has been confirmed. |
| 2917 | 2917 | ||
| 2918 | If the `use-short-answers' variable is non-nil, instead of asking for | ||
| 2919 | \"yes\" or \"no\", this function will ask for \"y\" or \"n\". | ||
| 2920 | |||
| 2918 | If dialog boxes are supported, a dialog box will be used | 2921 | If dialog boxes are supported, a dialog box will be used |
| 2919 | if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */) | 2922 | if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */) |
| 2920 | (Lisp_Object prompt) | 2923 | (Lisp_Object prompt) |