aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c25
1 files 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)
3257 goto retry; 3257 goto retry;
3258 } 3258 }
3259 3259
3260 if (! reread || this_command_key_count == 0 3260 if ((! reread || this_command_key_count == 0
3261 || this_command_key_count_reset) 3261 || this_command_key_count_reset)
3262 && !end_time)
3262 { 3263 {
3263 3264
3264 /* Don't echo mouse motion events. */ 3265 /* Don't echo mouse motion events. */
@@ -8765,17 +8766,25 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
8765 the initial keymaps from the current buffer. */ 8766 the initial keymaps from the current buffer. */
8766 nmaps = 0; 8767 nmaps = 0;
8767 8768
8768 if (!NILP (current_kboard->Voverriding_terminal_local_map) 8769 if (!NILP (current_kboard->Voverriding_terminal_local_map))
8769 || !NILP (Voverriding_local_map))
8770 { 8770 {
8771 if (3 > nmaps_allocated) 8771 if (2 > nmaps_allocated)
8772 { 8772 {
8773 submaps = (Lisp_Object *) alloca (3 * sizeof (submaps[0])); 8773 submaps = (Lisp_Object *) alloca (2 * sizeof (submaps[0]));
8774 defs = (Lisp_Object *) alloca (3 * sizeof (defs[0])); 8774 defs = (Lisp_Object *) alloca (2 * sizeof (defs[0]));
8775 nmaps_allocated = 3; 8775 nmaps_allocated = 2;
8776 } 8776 }
8777 if (!NILP (current_kboard->Voverriding_terminal_local_map)) 8777 if (!NILP (current_kboard->Voverriding_terminal_local_map))
8778 submaps[nmaps++] = current_kboard->Voverriding_terminal_local_map; 8778 submaps[nmaps++] = current_kboard->Voverriding_terminal_local_map;
8779 }
8780 else if (!NILP (Voverriding_local_map))
8781 {
8782 if (2 > nmaps_allocated)
8783 {
8784 submaps = (Lisp_Object *) alloca (2 * sizeof (submaps[0]));
8785 defs = (Lisp_Object *) alloca (2 * sizeof (defs[0]));
8786 nmaps_allocated = 2;
8787 }
8779 if (!NILP (Voverriding_local_map)) 8788 if (!NILP (Voverriding_local_map))
8780 submaps[nmaps++] = Voverriding_local_map; 8789 submaps[nmaps++] = Voverriding_local_map;
8781 } 8790 }