aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorStefan Monnier2013-02-11 14:21:23 -0500
committerStefan Monnier2013-02-11 14:21:23 -0500
commit99d0d6dc23f0fd2ee6d64f0f18a33f2b791c642d (patch)
tree2cd8a54c22c9354415306c76bd65dddde723532f /src/keymap.c
parentf5e1b6804dc2307983e4c55d4d6530549ddccbb7 (diff)
downloademacs-99d0d6dc23f0fd2ee6d64f0f18a33f2b791c642d.tar.gz
emacs-99d0d6dc23f0fd2ee6d64f0f18a33f2b791c642d.zip
Clean up read_key_sequence a bit; reread active keymaps after first event.
* src/keyboard.c (read_char, read_char_x_menu_prompt) (read_char_minibuf_menu_prompt): Replace nmaps+maps with a single `map' arg. (follow_key): Operate on a single map. (active_maps): New function. (test_undefined): Also return true for nil bindings. (read_key_sequence): Use active_maps to replace the arrays of keymaps with a single (composed) keymap. Remember `first_event' to choose the right set of active keymaps. Recompute the set of keymaps after receiving the first event. Remove GOBBLE_FIRST_EVENT. (syms_of_keyboard): Remove inhibit_local_menu_bar_menus. * src/keyboard.h (read_char): Update declaration. * src/lread.c (read_filtered_event): Adjust call to read_char. * lisp/cus-start.el (all): Remove inhibit-local-menu-bar-menus.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 1e201e06dc3..922c1703edf 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1244,7 +1244,7 @@ remapping in all currently active keymaps. */)
1244 return INTEGERP (command) ? Qnil : command; 1244 return INTEGERP (command) ? Qnil : command;
1245} 1245}
1246 1246
1247/* Value is number if KEY is too long; nil if valid but has no definition. */ 1247/* Value is number if KEY is too long; nil if valid but has no definition. */
1248/* GC is possible in this function. */ 1248/* GC is possible in this function. */
1249 1249
1250DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0, 1250DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0,
@@ -1536,7 +1536,7 @@ DEFUN ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps,
1536 doc: /* Return a list of the currently active keymaps. 1536 doc: /* Return a list of the currently active keymaps.
1537OLP if non-nil indicates that we should obey `overriding-local-map' and 1537OLP if non-nil indicates that we should obey `overriding-local-map' and
1538`overriding-terminal-local-map'. POSITION can specify a click position 1538`overriding-terminal-local-map'. POSITION can specify a click position
1539like in the respective argument of `key-binding'. */) 1539like in the respective argument of `key-binding'. */)
1540 (Lisp_Object olp, Lisp_Object position) 1540 (Lisp_Object olp, Lisp_Object position)
1541{ 1541{
1542 ptrdiff_t count = SPECPDL_INDEX (); 1542 ptrdiff_t count = SPECPDL_INDEX ();
@@ -1545,7 +1545,7 @@ like in the respective argument of `key-binding'. */)
1545 1545
1546 /* If a mouse click position is given, our variables are based on 1546 /* If a mouse click position is given, our variables are based on
1547 the buffer clicked on, not the current buffer. So we may have to 1547 the buffer clicked on, not the current buffer. So we may have to
1548 switch the buffer here. */ 1548 switch the buffer here. */
1549 1549
1550 if (CONSP (position)) 1550 if (CONSP (position))
1551 { 1551 {