aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2021-02-25 20:58:44 +0200
committerEli Zaretskii2021-02-25 20:58:44 +0200
commit6bf56a3614ccd23a31e34ae997b2a6bb0d158489 (patch)
tree7b7ffb602c6afba5779e6d20164096de90e50e5c
parent297c0e0306f111c1e7564b2bb49a7e1a925a55bb (diff)
downloademacs-6bf56a3614ccd23a31e34ae997b2a6bb0d158489.tar.gz
emacs-6bf56a3614ccd23a31e34ae997b2a6bb0d158489.zip
Fix documentation of a recent change
* src/fns.c (Fyes_or_no_p): Don't use braces around one-line block. (syms_of_fns) <use-short-answers>: Improve the wording of the doc string. * etc/NEWS: Improve wording of the entry about 'use-short-answers'.
-rw-r--r--etc/NEWS5
-rw-r--r--src/fns.c12
2 files changed, 8 insertions, 9 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 1ec080a6db5..f8f41e21e2d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2416,8 +2416,9 @@ use the function 'read-key' to read a character instead of using the minibuffer.
2416 2416
2417--- 2417---
2418** New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p'. 2418** New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p'.
2419This relieves of the need to define an alias that maps one to another 2419This eliminates the need to define an alias that maps one to another
2420in the init file. The same variable also affects the function 'read-answer'. 2420in the init file. The same variable also controls whether the
2421function 'read-answer' accepts short answers.
2421 2422
2422+++ 2423+++
2423** 'set-window-configuration' now takes an optional 'dont-set-frame' 2424** 'set-window-configuration' now takes an optional 'dont-set-frame'
diff --git a/src/fns.c b/src/fns.c
index 79b5a1e9930..7914bd47790 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2874,9 +2874,7 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
2874 } 2874 }
2875 2875
2876 if (use_short_answers) 2876 if (use_short_answers)
2877 { 2877 return call1 (intern ("y-or-n-p"), prompt);
2878 return call1 (intern ("y-or-n-p"), prompt);
2879 }
2880 2878
2881 AUTO_STRING (yes_or_no, "(yes or no) "); 2879 AUTO_STRING (yes_or_no, "(yes or no) ");
2882 prompt = CALLN (Fconcat, prompt, yes_or_no); 2880 prompt = CALLN (Fconcat, prompt, yes_or_no);
@@ -5911,10 +5909,10 @@ this variable. */);
5911 5909
5912 DEFVAR_BOOL ("use-short-answers", use_short_answers, 5910 DEFVAR_BOOL ("use-short-answers", use_short_answers,
5913 doc: /* Non-nil means `yes-or-no-p' uses shorter answers "y" or "n". 5911 doc: /* Non-nil means `yes-or-no-p' uses shorter answers "y" or "n".
5914It's discouraged to use single-key answers because `yes-or-no-p' is 5912When non-nil, `yes-or-no-p' will use `y-or-n-p' to read the answer.
5915intended to be used when it's thought that you should not respond too 5913We recommend against setting this variable non-nil, because `yes-or-no-p'
5916quickly, so you take time and perhaps think more about the answer. 5914is intended to be used when users are expected not to respond too
5917When non-nil, then `yes-or-no-p' uses `y-or-n-p' to read an answer. 5915quickly, but to take their time and perhaps think about the answer.
5918The same variable also affects the function `read-answer'. */); 5916The same variable also affects the function `read-answer'. */);
5919 use_short_answers = false; 5917 use_short_answers = false;
5920 5918