emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r110956: * xdisp.c (buffer_shared): A


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110956: * xdisp.c (buffer_shared): Adjust comment.
Date: Tue, 20 Nov 2012 11:53:04 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110956
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2012-11-20 11:53:04 +0400
message:
  * xdisp.c (buffer_shared): Adjust comment.
  (buffer_shared_and_changed): New function.
  (prepare_menu_bars, redisplay_internal): Use it to
  decide whether all windows or frames should be updated.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-11-20 04:24:09 +0000
+++ b/src/ChangeLog     2012-11-20 07:53:04 +0000
@@ -1,3 +1,10 @@
+2012-11-20  Dmitry Antipov  <address@hidden>
+
+       * xdisp.c (buffer_shared): Adjust comment.
+       (buffer_shared_and_changed): New function.
+       (prepare_menu_bars, redisplay_internal): Use it to
+       decide whether all windows or frames should be updated.
+
 2012-11-20  Stefan Monnier  <address@hidden>
 
        * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): 
Remove.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-11-14 11:13:33 +0000
+++ b/src/xdisp.c       2012-11-20 07:53:04 +0000
@@ -515,9 +515,8 @@
 
 static int overlay_arrow_seen;
 
-/* Number of windows showing the buffer of the selected window (or
-   another buffer with the same base buffer).  keyboard.c refers to
-   this.  */
+/* Number of windows showing the buffer of the selected
+   window (or another buffer with the same base buffer).  */
 
 int buffer_shared;
 
@@ -10889,8 +10888,15 @@
   return window_height_changed_p;
 }
 
-
-
+/* True if the current buffer is shown in more than
+   one window and was modified since last display.  */
+
+static int
+buffer_shared_and_changed (void)
+{
+  return (buffer_shared > 1 && UNCHANGED_MODIFIED < MODIFF);
+}
+
 /***********************************************************************
                     Mode Lines and Frame Titles
  ***********************************************************************/
@@ -11196,7 +11202,7 @@
   /* Update the menu bar item lists, if appropriate.  This has to be
      done before any actual redisplay or generation of display lines.  */
   all_windows = (update_mode_lines
-                || buffer_shared > 1
+                || buffer_shared_and_changed ()
                 || windows_or_buffers_changed);
   if (all_windows)
     {
@@ -13116,7 +13122,7 @@
   if ((SAVE_MODIFF < MODIFF) != w->last_had_star)
     {
       w->update_mode_line = 1;
-      if (buffer_shared > 1)
+      if (buffer_shared_and_changed ())
        update_mode_lines++;
     }
 
@@ -13141,7 +13147,8 @@
   /* The variable buffer_shared is set in redisplay_window and
      indicates that we redisplay a buffer in different windows.  See
      there.  */
-  consider_all_windows_p = (update_mode_lines || buffer_shared > 1
+  consider_all_windows_p = (update_mode_lines
+                           || buffer_shared_and_changed ()
                            || cursor_type_changed);
 
   /* If specs for an arrow have changed, do thorough redisplay
@@ -13433,7 +13440,7 @@
     }
 
   CHARPOS (this_line_start_pos) = 0;
-  consider_all_windows_p |= buffer_shared > 1;
+  consider_all_windows_p |= buffer_shared_and_changed ();
   ++clear_face_cache_count;
 #ifdef HAVE_WINDOW_SYSTEM
   ++clear_image_cache_count;


reply via email to

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