emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4c8e23d5d7: Clarify read-answer-short/use-short-answers action


From: Lars Ingebrigtsen
Subject: master 4c8e23d5d7: Clarify read-answer-short/use-short-answers action
Date: Thu, 7 Apr 2022 07:37:32 -0400 (EDT)

branch: master
commit 4c8e23d5d7fb662dc9eefba67b52ae5df0dffe62
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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'.
---
 lisp/emacs-lisp/map-ynp.el | 10 ++++++++--
 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 b3e7fca478..c47025f884 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;
 
 ;; For backward compatibility check if short y/n answers are preferred.
 (defcustom read-answer-short 'auto
-  "If non-nil, `read-answer' accepts single-character answers.
+  "If non-nil, the `read-answer' function accepts single-character answers.
 If t, accept short (single key-press) answers to the question.
 If nil, require long answers.  If `auto', accept short answers if
 `use-short-answers' is non-nil, or the function cell of `yes-or-no-p'
-is set to `y-or-n-p'."
+is set to `y-or-n-p'.
+
+Note that this variable does not affect calls to the more
+commonly-used `yes-or-no-p' function; it only affects calls to
+the `read-answer' function.  To control whether `yes-or-no-p'
+requires a long or a short answer, see the `use-short-answers'
+variable."
   :type '(choice (const :tag "Accept short answers" t)
                  (const :tag "Require long answer" nil)
                  (const :tag "Guess preference" auto))
diff --git a/src/fns.c b/src/fns.c
index ee4e80b506..4673fde28c 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2915,6 +2915,9 @@ it does up to one space will be removed.
 The user must confirm the answer with RET, and can edit it until it
 has been confirmed.
 
+If the `use-short-answers' variable is non-nil, instead of asking for
+\"yes\" or \"no\", this function will ask for \"y\" or \"n\".
+
 If dialog boxes are supported, a dialog box will be used
 if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil.  */)
   (Lisp_Object prompt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]