changeset 25491:0359edc6e428

(set_buffer_internal): Never set windows_or_buffers_changed.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 02 Sep 1999 20:35:53 +0000
parents af3e44ec3b8c
children 863b49f711d6
files src/buffer.c
diffstat 1 files changed, 9 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Thu Sep 02 20:35:50 1999 +0000
+++ b/src/buffer.c	Thu Sep 02 20:35:53 1999 +0000
@@ -1430,29 +1430,21 @@
   return buf;
 }
 
-/* Set the current buffer to B.  */
+/* Set the current buffer to B.
+
+   We previously set windows_or_buffers_changed here to invalidate
+   global unchanged information in beg_unchanged and end_unchanged.
+   This is no longer necessary because we now compute unchanged
+   information on a buffer-basis.  Every action affecting other
+   windows than the selected one requires a select_window at some
+   time, and that increments windows_or_buffers_changed.  */
 
 void
 set_buffer_internal (b)
      register struct buffer *b;
 {
   if (current_buffer != b)
-    {
-      /* Set windows_or_buffers_changed only if buffer is displayed
-	 somewhere.  This enables redisplay optimizations if a
-	 background task like deferred fontification changes buffers,
-	 but none that are currently displayed.  */
-      if (!windows_or_buffers_changed
-	  && selected_frame)
-	{
-	  Lisp_Object buffer;
-	  XSETBUFFER (buffer, b);
-	  if (!NILP (Fget_buffer_window (buffer, Qvisible)))
-	    ++windows_or_buffers_changed;
-	}
-  
-      set_buffer_internal_1 (b);
-    }
+    set_buffer_internal_1 (b);
 }
 
 /* Set the current buffer to B, and do not set windows_or_buffers_changed.