aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-13 00:46:33 +0000
committerRichard M. Stallman1997-06-13 00:46:33 +0000
commit303b5b3f0f2de500d03eb347ab09a79214bc3ace (patch)
tree078e46af5c07fa4dee10d20f6b287a16bd776c2a /src
parent69645afc5310cb5cad6fc6769de55e9102ffaaa9 (diff)
downloademacs-303b5b3f0f2de500d03eb347ab09a79214bc3ace.tar.gz
emacs-303b5b3f0f2de500d03eb347ab09a79214bc3ace.zip
(kbd_buffer_get_event): When wait_reading_process_input
returns, check Vunread_command_events.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 8a89ce917a3..50f20d639fd 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1885,7 +1885,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1885 restore_getcjmp (local_getcjmp); 1885 restore_getcjmp (local_getcjmp);
1886 tem0 = sit_for (echo_keystrokes, 0, 1, 1, 0); 1886 tem0 = sit_for (echo_keystrokes, 0, 1, 1, 0);
1887 restore_getcjmp (save_jump); 1887 restore_getcjmp (save_jump);
1888 if (EQ (tem0, Qt)) 1888 if (EQ (tem0, Qt)
1889 && ! CONSP (Vunread_command_events))
1889 echo_now (); 1890 echo_now ();
1890 } 1891 }
1891 } 1892 }
@@ -1955,7 +1956,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1955 0, 1, 1, 0); 1956 0, 1, 1, 0);
1956 restore_getcjmp (save_jump); 1957 restore_getcjmp (save_jump);
1957 1958
1958 if (EQ (tem0, Qt)) 1959 if (EQ (tem0, Qt)
1960 && ! CONSP (Vunread_command_events))
1959 { 1961 {
1960 Fdo_auto_save (Qnil, Qnil); 1962 Fdo_auto_save (Qnil, Qnil);
1961 1963
@@ -1971,6 +1973,14 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1971 } 1973 }
1972 } 1974 }
1973 1975
1976 /* If this has become non-nil here, it has been set by a timer
1977 or sentinel or filter. */
1978 if (CONSP (Vunread_command_events))
1979 {
1980 c = XCONS (Vunread_command_events)->car;
1981 Vunread_command_events = XCONS (Vunread_command_events)->cdr;
1982 }
1983
1974 /* Read something from current KBOARD's side queue, if possible. */ 1984 /* Read something from current KBOARD's side queue, if possible. */
1975 1985
1976 if (NILP (c)) 1986 if (NILP (c))
@@ -2668,6 +2678,15 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
2668#endif /* not VMS */ 2678#endif /* not VMS */
2669 } 2679 }
2670 2680
2681 if (CONSP (Vunread_command_events))
2682 {
2683 Lisp_Object first;
2684 first = XCONS (Vunread_command_events)->car;
2685 Vunread_command_events = XCONS (Vunread_command_events)->cdr;
2686 *kbp = current_kboard;
2687 return first;
2688 }
2689
2671 /* At this point, we know that there is a readable event available 2690 /* At this point, we know that there is a readable event available
2672 somewhere. If the event queue is empty, then there must be a 2691 somewhere. If the event queue is empty, then there must be a
2673 mouse movement enabled and available. */ 2692 mouse movement enabled and available. */
@@ -7092,7 +7111,8 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
7092 /* But first wait, and skip the message if there is input. */ 7111 /* But first wait, and skip the message if there is input. */
7093 if (!NILP (Fsit_for ((NUMBERP (Vsuggest_key_bindings) 7112 if (!NILP (Fsit_for ((NUMBERP (Vsuggest_key_bindings)
7094 ? Vsuggest_key_bindings : make_number (2)), 7113 ? Vsuggest_key_bindings : make_number (2)),
7095 Qnil, Qnil))) 7114 Qnil, Qnil))
7115 && ! CONSP (Vunread_command_events))
7096 { 7116 {
7097 Lisp_Object binding; 7117 Lisp_Object binding;
7098 char *newmessage; 7118 char *newmessage;