Variable: y-or-n-p-use-read-key
y-or-n-p-use-read-key is a variable defined in subr.el.gz.
Value
nil
Documentation
Use read-key when reading answers to "y or n" questions by y-or-n-p.
Otherwise, use the read-from-minibuffer to read the answers.
When reading via the minibuffer, you can use the normal commands
available in the minibuffer, and can, for instance, temporarily
switch to another buffer, do things there, and then switch back
to the minibuffer before entering the character. This is not
possible when using read-key, but using read-key may be less
confusing to some users.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defvar y-or-n-p-use-read-key nil
"Use `read-key' when reading answers to \"y or n\" questions by `y-or-n-p'.
Otherwise, use the `read-from-minibuffer' to read the answers.
When reading via the minibuffer, you can use the normal commands
available in the minibuffer, and can, for instance, temporarily
switch to another buffer, do things there, and then switch back
to the minibuffer before entering the character. This is not
possible when using `read-key', but using `read-key' may be less
confusing to some users.")