changeset 8502:0d7af9e98916

(record_asynch_buffer_change): Do nothing except when waiting_for_user_input_p.
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Aug 1994 03:21:20 +0000
parents cfdb7a4cacc9
children 084456e12635
files src/keyboard.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Wed Aug 10 03:20:52 1994 +0000
+++ b/src/keyboard.c	Wed Aug 10 03:21:20 1994 +0000
@@ -3419,9 +3419,19 @@
 record_asynch_buffer_change ()
 {
   struct input_event event;
+  Lisp_Object tem;
+
   event.kind = buffer_switch_event;
   event.frame_or_window = Qnil;
 
+  /* We don't need a buffer-switch event unless Emacs is waiting for input.
+     The purpose of the event is to make read_key_sequence look up the
+     keymaps again.  If we aren't in read_key_sequence, we don't need one,
+     and the event could cause trouble by messing up (input-pending-p).  */
+  tem = Fwaiting_for_user_input_p ();
+  if (NILP (tem))
+    return;
+
   /* Make sure no interrupt happens while storing the event.  */
 #ifdef SIGIO
   if (interrupt_input)