emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ec10ba2: * src/keyboard.c (swallow_events): Don't r


From: Stefan Monnier
Subject: [Emacs-diffs] master ec10ba2: * src/keyboard.c (swallow_events): Don't redisplay if there's input pending.
Date: Wed, 17 Dec 2014 22:08:24 +0000

branch: master
commit ec10ba2792eef613caf47fff83e869d4bc177616
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * src/keyboard.c (swallow_events): Don't redisplay if there's input pending.
---
 src/ChangeLog  |    4 ++++
 src/dispnew.c  |    2 +-
 src/keyboard.c |    6 +++---
 src/process.c  |    6 +++---
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 3854803..01653de 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-17  Stefan Monnier  <address@hidden>
+
+       * keyboard.c (swallow_events): Don't redisplay if there's input pending.
+
 2014-12-17  Ulf Jasper  <address@hidden>
 
        * image.c (svg_load): Watch out for nil value of current buffer's
diff --git a/src/dispnew.c b/src/dispnew.c
index a68901a..212caa8 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5785,7 +5785,7 @@ immediately by pending input.  */)
 {
   ptrdiff_t count;
 
-  swallow_events (1);
+  swallow_events (true);
   if ((detect_input_pending_run_timers (1)
        && NILP (force) && !redisplay_dont_pause)
       || !NILP (Vexecuting_kbd_macro))
diff --git a/src/keyboard.c b/src/keyboard.c
index beb3459..9e12f59 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2582,7 +2582,7 @@ read_char (int commandflag, Lisp_Object map,
           user-visible, such as X selection_request events.  */
       if (input_pending
          || detect_input_pending_run_timers (0))
-       swallow_events (0);             /* May clear input_pending.  */
+       swallow_events (false);         /* May clear input_pending.  */
 
       /* Redisplay if no pending input.  */
       while (!input_pending)
@@ -2598,7 +2598,7 @@ read_char (int commandflag, Lisp_Object map,
 
          /* Input arrived and pre-empted redisplay.
             Process any events which are not user-visible.  */
-         swallow_events (0);
+         swallow_events (false);
          /* If that cleared input_pending, try again to redisplay.  */
        }
 
@@ -4370,7 +4370,7 @@ swallow_events (bool do_display)
   old_timers_run = timers_run;
   get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW);
 
-  if (timers_run != old_timers_run && do_display)
+  if (!input_pending && timers_run != old_timers_run && do_display)
     redisplay_preserve_echo_area (7);
 }
 
diff --git a/src/process.c b/src/process.c
index e59ca58..c58ae3e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4473,7 +4473,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
          && ! EQ (wait_proc->status, Qrun)
          && ! EQ (wait_proc->status, Qconnect))
        {
-         bool read_some_bytes = 0;
+         bool read_some_bytes = false;
 
          clear_waiting_for_input ();
          XSETPROCESS (proc, wait_proc);
@@ -4689,13 +4689,13 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
          unsigned old_timers_run = timers_run;
          struct buffer *old_buffer = current_buffer;
          Lisp_Object old_window = selected_window;
-         bool leave = 0;
+         bool leave = false;
 
          if (detect_input_pending_run_timers (do_display))
            {
              swallow_events (do_display);
              if (detect_input_pending_run_timers (do_display))
-               leave = 1;
+               leave = true;
            }
 
          /* If a timer has run, this might have changed buffers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]