Variable: use-short-answers
use-short-answers is a customizable variable defined in fns.c.
Value
nil
Documentation
Non-nil means yes-or-no-p accepts single-key answers "y" or "n".
When non-nil, yes-or-no-p will use y-or-n-p to read the answer.
This means the user will be able to press just one key to answer, whereas
by default the user needs to type the full "yes" or "no" response
and then press RET.
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. See also
yes-or-no-prompt.
This variable was added, or its default value changed, in Emacs 28.1.
Probably introduced at or before Emacs version 28.1.
Source Code
// Defined in /usr/src/emacs/src/fns.c
DEFVAR_BOOL ("use-short-answers", use_short_answers,
doc: /* Non-nil means `yes-or-no-p' accepts single-key answers "y" or "n".
When non-nil, `yes-or-no-p' will use `y-or-n-p' to read the answer.
This means the user will be able to press just one key to answer, whereas
by default the user needs to type the full \"yes\" or \"no\" response
and then press RET.
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'. See also
`yes-or-no-prompt'. */);