aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 76fba2e35ad..ff26a4e414b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3419,9 +3419,19 @@ gobble_input (expected)
3419record_asynch_buffer_change () 3419record_asynch_buffer_change ()
3420{ 3420{
3421 struct input_event event; 3421 struct input_event event;
3422 Lisp_Object tem;
3423
3422 event.kind = buffer_switch_event; 3424 event.kind = buffer_switch_event;
3423 event.frame_or_window = Qnil; 3425 event.frame_or_window = Qnil;
3424 3426
3427 /* We don't need a buffer-switch event unless Emacs is waiting for input.
3428 The purpose of the event is to make read_key_sequence look up the
3429 keymaps again. If we aren't in read_key_sequence, we don't need one,
3430 and the event could cause trouble by messing up (input-pending-p). */
3431 tem = Fwaiting_for_user_input_p ();
3432 if (NILP (tem))
3433 return;
3434
3425 /* Make sure no interrupt happens while storing the event. */ 3435 /* Make sure no interrupt happens while storing the event. */
3426#ifdef SIGIO 3436#ifdef SIGIO
3427 if (interrupt_input) 3437 if (interrupt_input)