From 4c0240d20a8d4b3a9f890bdb95d58b9ecdc281e1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Sep 2006 15:12:59 +0000 Subject: [PATCH] (read_char): If end_time specified, don't put the event into this_command_keys. (read_key_sequence): If Voverriding_terminal_local_map is specified, don't check Voverriding_local_map at all. --- src/keyboard.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 9d72256c5df..d6a74cf2196 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3257,8 +3257,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) goto retry; } - if (! reread || this_command_key_count == 0 - || this_command_key_count_reset) + if ((! reread || this_command_key_count == 0 + || this_command_key_count_reset) + && !end_time) { /* Don't echo mouse motion events. */ @@ -8765,17 +8766,25 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, the initial keymaps from the current buffer. */ nmaps = 0; - if (!NILP (current_kboard->Voverriding_terminal_local_map) - || !NILP (Voverriding_local_map)) + if (!NILP (current_kboard->Voverriding_terminal_local_map)) { - if (3 > nmaps_allocated) + if (2 > nmaps_allocated) { - submaps = (Lisp_Object *) alloca (3 * sizeof (submaps[0])); - defs = (Lisp_Object *) alloca (3 * sizeof (defs[0])); - nmaps_allocated = 3; + submaps = (Lisp_Object *) alloca (2 * sizeof (submaps[0])); + defs = (Lisp_Object *) alloca (2 * sizeof (defs[0])); + nmaps_allocated = 2; } if (!NILP (current_kboard->Voverriding_terminal_local_map)) submaps[nmaps++] = current_kboard->Voverriding_terminal_local_map; + } + else if (!NILP (Voverriding_local_map)) + { + if (2 > nmaps_allocated) + { + submaps = (Lisp_Object *) alloca (2 * sizeof (submaps[0])); + defs = (Lisp_Object *) alloca (2 * sizeof (defs[0])); + nmaps_allocated = 2; + } if (!NILP (Voverriding_local_map)) submaps[nmaps++] = Voverriding_local_map; } -- 2.39.2