]> git.eshelyaron.com Git - emacs.git/commit
Don't infinite loop in map-y-or-n-p if at the end of kmacro
authorSpencer Baugh <sbaugh@janestreet.com>
Fri, 10 Nov 2023 16:27:10 +0000 (11:27 -0500)
committerEli Zaretskii <eliz@gnu.org>
Wed, 15 Nov 2023 17:12:46 +0000 (19:12 +0200)
commit7cfe088bc35f14391014b4f93a784fdef412da9c
treed3d34cab3ab9601c2b9aa090385eea30ecbc5a56
parent1a1f47e4a1fb70e6810f9eabd0f1826b71a2bcb0
Don't infinite loop in map-y-or-n-p if at the end of kmacro

Previously, if map-y-or-n-p got -1 from read-event (indicating no
input due to the end of a keyboard macro), it would just infinite
loop.

Now it behaves like other commands which use read-event/read-char/etc,
and just errors when we try to look up -1 in our keymap and find
nothing.

Also, just for the sake of users, print a slightly prettier message
when this happens.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't loop if we reach
the end of a keyboard macro.  (Bug#67046)
lisp/emacs-lisp/map-ynp.el