aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu.h
diff options
context:
space:
mode:
authorAlan Mackenzie2017-12-02 10:00:56 +0000
committerAlan Mackenzie2017-12-02 10:00:56 +0000
commitbc092fcaea7268f2339f0e92720a37e62cdca5b2 (patch)
treef5616124003faa9b852d9388fbd22927a520cd44 /src/menu.h
parent4856ee17175a80dc105e060c1184d3b3df07e1cf (diff)
downloademacs-bc092fcaea7268f2339f0e92720a37e62cdca5b2.tar.gz
emacs-bc092fcaea7268f2339f0e92720a37e62cdca5b2.zip
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.
Diffstat (limited to 'src/menu.h')
-rw-r--r--src/menu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/menu.h b/src/menu.h
index 1469cc87d99..3335616338d 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -60,4 +60,5 @@ extern Lisp_Object ns_menu_show (struct frame *, int, int, int,
60extern Lisp_Object tty_menu_show (struct frame *, int, int, int, 60extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
61 Lisp_Object, const char **); 61 Lisp_Object, const char **);
62extern ptrdiff_t menu_item_width (const unsigned char *); 62extern ptrdiff_t menu_item_width (const unsigned char *);
63extern Lisp_Object x_popup_menu_1 (Lisp_Object position, Lisp_Object menu);
63#endif /* MENU_H */ 64#endif /* MENU_H */