]> git.eshelyaron.com Git - emacs.git/commit
For help commands, ensure all keys of a mouse sequence are reported.
authorAlan Mackenzie <acm@muc.de>
Sat, 2 Dec 2017 10:00:56 +0000 (10:00 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 2 Dec 2017 10:00:56 +0000 (10:00 +0000)
commitbc092fcaea7268f2339f0e92720a37e62cdca5b2
treef5616124003faa9b852d9388fbd22927a520cd44
parent4856ee17175a80dc105e060c1184d3b3df07e1cf
For help commands, ensure all keys of a mouse sequence are reported.

This solves the problem where read_key_sequence initializes and uses a global
buffer raw_keybuf, yet is called recusrsively.  The initialization is now done
elsewhere, avoiding the reinitialization of that global buffer.

* src/keyboard.c (command_loop_1, read_key_sequence_vs): Initialize
raw_event_count before calling read_key_sequence.
(read_char_x_menu_prompt): Call x_popup_menu_1 in place of Fx_popup_menu.
(init_raw_keybuf_count): New function.
(read_key_sequence): Remove initialization of raw_event_count.  Add a missing
GROW_RAW_KEYBUF invocation.

* src/keyboard.h: (init_raw_keybuf_count): New declaration.

* src/menu.c: (x_popup_menu_1): New function with the functionality of the
former Fx_popup_menu.
(Fx_popup_menu): Replace with function which initializes raw_event_count then
calls x_popup_menu_1.

* src/menu.h: (x_popup_menu_1): New declaration.
src/keyboard.c
src/keyboard.h
src/menu.c
src/menu.h