]> git.eshelyaron.com Git - emacs.git/commitdiff
(wait_reading_process_input): Call
authorGerd Moellmann <gerd@gnu.org>
Thu, 19 Apr 2001 12:47:59 +0000 (12:47 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 19 Apr 2001 12:47:59 +0000 (12:47 +0000)
record_asynch_buffer_change after running timers, to make
read_key_sequence aware of buffer changes from under it.

src/ChangeLog
src/process.c

index 6facf4244d7cab1269637f4cb35c6b7087743252..bf411ea416f028234c0791ba81ea6fef8907898a 100644 (file)
@@ -1,3 +1,9 @@
+2001-04-19  Gerd Moellmann  <gerd@gnu.org>
+
+       * process.c (wait_reading_process_input): Call
+       record_asynch_buffer_change after running timers, to make
+       read_key_sequence aware of buffer changes from under it.
+
 2001-04-18  Gerd Moellmann  <gerd@gnu.org>
 
        * xfaces.c (Qscalable_fonts_allowed): New variable.
index afc4155784a50af9d814fb90f4971a5074ca9564..35e67c45f9ee0746dc92af594aa864d4aed589ba 100644 (file)
@@ -2453,7 +2453,15 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
          do
            {
              int old_timers_run = timers_run;
+             
              timer_delay = timer_check (1);
+
+             /* If a timer has run, this might have changed buffers
+                an alike.  Make read_key_sequence aware of that.  */
+             if (timers_run != old_timers_run
+                 && waiting_for_user_input_p == -1)
+               record_asynch_buffer_change ();
+             
              if (timers_run != old_timers_run && do_display)
                /* We must retry, since a timer may have requeued itself
                   and that could alter the time_delay.  */
@@ -2667,14 +2675,28 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
       /* If there is any, return immediately
         to give it higher priority than subprocesses */
 
-      if (XINT (read_kbd) != 0
-         && detect_input_pending_run_timers (do_display))
+      if (XINT (read_kbd) != 0)
        {
-         swallow_events (do_display);
+         int old_timers_run = timers_run;
+         int leave = 0;
+       
          if (detect_input_pending_run_timers (do_display))
-           break;
-       }
+           {
+             swallow_events (do_display);
+             if (detect_input_pending_run_timers (do_display))
+               leave = 1;
+           }
 
+         /* If a timer has run, this might have changed buffers
+            an alike.  Make read_key_sequence aware of that.  */
+         if (timers_run != old_timers_run
+             && waiting_for_user_input_p == -1)
+           record_asynch_buffer_change ();
+
+         if (leave)
+           break;
+       }    
+      
       /* If there is unread keyboard input, also return.  */
       if (XINT (read_kbd) != 0
          && requeued_events_pending_p ())
@@ -4894,14 +4916,28 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
 
       /* Check for keyboard input */
 
-      if ((XINT (read_kbd) != 0)
-         && detect_input_pending_run_timers (do_display))
+      if (XINT (read_kbd) != 0)
        {
-         swallow_events (do_display);
+         int old_timers_run = timers_run;
+         int leave = 0;
+       
          if (detect_input_pending_run_timers (do_display))
-           break;
-       }
+           {
+             swallow_events (do_display);
+             if (detect_input_pending_run_timers (do_display))
+               leave = 1;
+           }
+
+         /* If a timer has run, this might have changed buffers
+            an alike.  Make read_key_sequence aware of that.  */
+         if (timers_run != old_timers_run
+             && waiting_for_user_input_p == -1)
+           record_asynch_buffer_change ();
 
+         if (leave)
+           break;
+       }    
+      
       /* If there is unread keyboard input, also return.  */
       if (XINT (read_kbd) != 0
          && requeued_events_pending_p ())