]> git.eshelyaron.com Git - emacs.git/commitdiff
(STOP_POLLING, RESUME_POLLING): New macros.
authorRichard M. Stallman <rms@gnu.org>
Sun, 29 Sep 2002 17:46:12 +0000 (17:46 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 29 Sep 2002 17:46:12 +0000 (17:46 +0000)
(redisplay_internal): Use them.  Do RESUME_POLLING at end of function.

src/ChangeLog
src/xdisp.c

index 73abc9bdfa4e2c91f20d4e69751bb23d39583964..9a4a0a446cee6e3f230c7e71fa23133db641a1aa 100644 (file)
@@ -1,3 +1,13 @@
+2002-09-29  Richard M. Stallman  <rms@gnu.org>
+
+       * xdisp.c (STOP_POLLING, RESUME_POLLING): New macros.
+       (redisplay_internal): Use them.  Do RESUME_POLLING at end of function.
+
+2002-09-27  Richard M. Stallman  <rms@gnu.org>
+
+       * keyboard.c (STOP_POLLING, RESUME_POLLING): New macros.
+       (read_char): Use them.  Do all exits thru the end of the function.
+
 2002-09-27  Kenichi Handa  <handa@etl.go.jp>
 
        * xfaces.c (try_font_list): Pay attention to the case that FAMILY
index 16c351b9f91e4a0d4a1ce040c5eb08892b600e4e..64e94a9d6d10dbf3a8dc13360597a799d1e9df83 100644 (file)
@@ -8471,6 +8471,14 @@ reconsider_clip_changes (w, b)
        b->clip_changed = 1;
     }
 }
+\f
+#define STOP_POLLING                                   \
+do { if (! polling_stopped_here) stop_polling ();      \
+       polling_stopped_here = 1; } while (0)
+
+#define RESUME_POLLING                                 \
+do { if (polling_stopped_here) start_polling ();       \
+       polling_stopped_here = 0; } while (0)
 
 
 /* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay is not in
@@ -8491,6 +8499,7 @@ redisplay_internal (preserve_echo_area)
   int number_of_visible_frames;
   int count;
   struct frame *sf = SELECTED_FRAME ();
+  int polling_stopped_here = 0;
 
   /* Non-zero means redisplay has to consider all windows on all
      frames.  Zero means, only selected_window is considered.  */
@@ -8979,7 +8988,7 @@ redisplay_internal (preserve_echo_area)
                     error.  */
                  if (interrupt_input)
                    unrequest_sigio ();
-                 stop_polling ();
+                 STOP_POLLING;
 
                  /* Update the display.  */
                  set_window_update_flags (XWINDOW (f->root_window), 1);
@@ -9035,7 +9044,7 @@ redisplay_internal (preserve_echo_area)
         which can cause an apparent I/O error.  */
       if (interrupt_input)
        unrequest_sigio ();
-      stop_polling ();
+      STOP_POLLING;
 
       if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
        {
@@ -9111,7 +9120,7 @@ redisplay_internal (preserve_echo_area)
      But it is much hairier to try to do anything about that.  */
   if (interrupt_input)
     request_sigio ();
-  start_polling ();
+  RESUME_POLLING;
 
   /* If a frame has become visible which was not before, redisplay
      again, so that we display it.  Expose events for such a frame
@@ -9152,6 +9161,7 @@ redisplay_internal (preserve_echo_area)
 
  end_of_redisplay:
   unbind_to (count, Qnil);
+  RESUME_POLLING;
 }