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'.
This commit is contained in:
Eli Zaretskii 2021-02-25 20:58:44 +02:00
parent 297c0e0306
commit 6bf56a3614
2 changed files with 8 additions and 9 deletions

View file

@ -2416,8 +2416,9 @@ use the function 'read-key' to read a character instead of using the minibuffer.
---
** New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p'.
This relieves of the need to define an alias that maps one to another
in the init file. The same variable also affects the function 'read-answer'.
This eliminates the need to define an alias that maps one to another
in the init file. The same variable also controls whether the
function 'read-answer' accepts short answers.
+++
** 'set-window-configuration' now takes an optional 'dont-set-frame'

View file

@ -2874,9 +2874,7 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
}
if (use_short_answers)
{
return call1 (intern ("y-or-n-p"), prompt);
}
return call1 (intern ("y-or-n-p"), prompt);
AUTO_STRING (yes_or_no, "(yes or no) ");
prompt = CALLN (Fconcat, prompt, yes_or_no);
@ -5911,10 +5909,10 @@ this variable. */);
DEFVAR_BOOL ("use-short-answers", use_short_answers,
doc: /* Non-nil means `yes-or-no-p' uses shorter answers "y" or "n".
It's discouraged to use single-key answers because `yes-or-no-p' is
intended to be used when it's thought that you should not respond too
quickly, so you take time and perhaps think more about the answer.
When non-nil, then `yes-or-no-p' uses `y-or-n-p' to read an answer.
When non-nil, `yes-or-no-p' will use `y-or-n-p' to read the answer.
We recommend against setting this variable non-nil, because `yes-or-no-p'
is intended to be used when users are expected not to respond too
quickly, but to take their time and perhaps think about the answer.
The same variable also affects the function `read-answer'. */);
use_short_answers = false;