1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

(read_char_minibuf_menu_prompt): Fix bug#80146

* src/keyboard.c (read_char_minibuf_menu_prompt): Give priority
to a binding in the map over the `menu_prompt_more_char` "binding".
(follow_key): Move before new first use.
This commit is contained in:
Stefan Monnier 2026-01-26 10:14:03 -05:00
parent 9983b18935
commit 120a451c04

View file

@ -10118,6 +10118,13 @@ read_char_x_menu_prompt (Lisp_Object map,
return Qnil ;
}
static Lisp_Object
follow_key (Lisp_Object keymap, Lisp_Object key)
{
return access_keymap (get_keymap (keymap, 0, 1),
key, 1, 0, 1);
}
static Lisp_Object
read_char_minibuf_menu_prompt (int commandflag,
Lisp_Object map)
@ -10329,7 +10336,10 @@ read_char_minibuf_menu_prompt (int commandflag,
if (!FIXNUMP (obj) || XFIXNUM (obj) == -2
|| (! EQ (obj, menu_prompt_more_char)
&& (!FIXNUMP (menu_prompt_more_char)
|| ! BASE_EQ (obj, make_fixnum (Ctl (XFIXNUM (menu_prompt_more_char)))))))
|| ! BASE_EQ (obj, make_fixnum (Ctl (XFIXNUM (menu_prompt_more_char))))))
/* If 'menu_prompt_more_char' collides with a binding in the
map, gives precedence to the map's binding (bug#80146). */
|| !NILP (follow_key (map, obj)))
{
if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
store_kbd_macro_char (obj);
@ -10341,13 +10351,6 @@ read_char_minibuf_menu_prompt (int commandflag,
/* Reading key sequences. */
static Lisp_Object
follow_key (Lisp_Object keymap, Lisp_Object key)
{
return access_keymap (get_keymap (keymap, 0, 1),
key, 1, 0, 1);
}
static Lisp_Object
active_maps (Lisp_Object first_event, Lisp_Object second_event)
{