emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115290: * src/xdisp.c (REDISPLAY_SOME_P): New macro


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r115290: * src/xdisp.c (REDISPLAY_SOME_P): New macro.
Date: Fri, 29 Nov 2013 18:20:32 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115290
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15999
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-29 13:20:24 -0500
message:
  * src/xdisp.c (REDISPLAY_SOME_P): New macro.
  (redisplay_internal): Use it.
  (prepare_menu_bars, redisplay_window): Use it as well.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-11-29 17:59:38 +0000
+++ b/src/ChangeLog     2013-11-29 18:20:24 +0000
@@ -1,5 +1,9 @@
 2013-11-29  Stefan Monnier  <address@hidden>
 
+       * xdisp.c (REDISPLAY_SOME_P): New macro.
+       (redisplay_internal): Use it (bug#15999).
+       (prepare_menu_bars, redisplay_window): Use it as well.
+
        * lisp.mk (lisp): Add electric.elc.
 
 2013-11-29  Tom Seddon  <address@hidden>  (tiny change)

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-11-29 08:53:50 +0000
+++ b/src/xdisp.c       2013-11-29 18:20:24 +0000
@@ -2870,8 +2870,8 @@
     }
   else
     {
-      it->first_visible_x =
-       window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f);
+      it->first_visible_x
+       = window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f);
       it->last_visible_x = (it->first_visible_x
                            + window_box_width (w, TEXT_AREA));
 
@@ -11198,6 +11198,12 @@
                              Menu Bars
  ***********************************************************************/
 
+/* Non-zero if we will not redisplay all visible windows.  */
+#define REDISPLAY_SOME_P()                             \
+  ((windows_or_buffers_changed == 0                    \
+    || windows_or_buffers_changed == REDISPLAY_SOME)   \
+   && (update_mode_lines == 0                          \
+       || update_mode_lines == REDISPLAY_SOME))
 
 /* Prepare for redisplay by updating menu-bar item lists when
    appropriate.  This can call eval.  */
@@ -11206,10 +11212,7 @@
 prepare_menu_bars (void)
 {
   bool all_windows = windows_or_buffers_changed || update_mode_lines;
-  bool some_windows = ((windows_or_buffers_changed == 0
-                       || windows_or_buffers_changed == REDISPLAY_SOME)
-                      && (update_mode_lines == 0
-                          || update_mode_lines == REDISPLAY_SOME));
+  bool some_windows = REDISPLAY_SOME_P ();
   struct gcpro gcpro1, gcpro2;
   Lisp_Object tooltip_frame;
 
@@ -13414,7 +13417,7 @@
            {
              bool gcscrollbars
                /* Only GC scollbars when we redisplay the whole frame.  */
-               = f->redisplay || windows_or_buffers_changed != REDISPLAY_SOME;
+               = f->redisplay || !REDISPLAY_SOME_P ();
              /* Mark all the scroll bars to be removed; we'll redeem
                 the ones we want when we redisplay their windows.  */
              if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
@@ -15409,10 +15412,7 @@
 #endif
 
   if (!just_this_one_p
-      && (update_mode_lines == REDISPLAY_SOME
-         || update_mode_lines == 0)
-      && (windows_or_buffers_changed == REDISPLAY_SOME
-         || windows_or_buffers_changed == 0)
+      && REDISPLAY_SOME_P ()
       && !w->redisplay
       && !f->redisplay
       && !buffer->text->redisplay)


reply via email to

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