emacs/doc
Juri Linkov 9e37c94079 Read a key sequence instead of a single key in 'map-y-or-n-p'
This is necessary to correctly read keys like 'M-~'
used by 'save-some-buffers' that is two keys 'ESC ~'
on a tty.

* doc/lispref/minibuf.texi (Multiple Queries):
Index 'y-or-n-p-use-read-key' for 'map-y-or-n-p'.
Mention using a key sequence instead of single keys.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
In the 'y-or-n-p-use-read-key' cond-branch,
use 'read-key-sequence-vector' instead of 'read-key'.
In the default cond-branch, use 'this-command-keys-vector'
instead of 'last-command-event'.  In both cond-branches
use 'key-description' instead of 'single-key-description'
(bug#81168).
Instead of '(eq def nil)' check if chars are either nil
or an empty vector in noninteractive mode (bug#67836).

* test/lisp/emacs-lisp/map-ynp-tests.el (test-map-ynp-kmacro):
Test separately nil/non-nil 'y-or-n-p-use-read-key'.
(test-map-ynp-keys): New test for complete coverage of
'map-y-or-n-p'.
2026-06-07 21:56:47 +03:00
..
emacs ; Document new features and update NEWS 2026-06-07 16:33:32 +03:00
lispintro ; * doc/lispintro/emacs-lisp-intro.texi: Update *Backtrace* outputs. 2026-05-03 12:06:54 +01:00
lispref Read a key sequence instead of a single key in 'map-y-or-n-p' 2026-06-07 21:56:47 +03:00
man
misc Adapt Tramp version 2026-06-05 13:21:15 +02:00
translations ; * doc/translations/fr/misc/ses-fr.texi: Typo. 2026-05-03 17:44:09 +02:00