changeset 9650:4295137050dd

(Fframe_or_buffer_changed_p): Detect deletion of a buffer at the end of the buffer list.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 Oct 1994 03:54:14 +0000
parents 910da93766c8
children 3c2685c4e09d
files src/dispnew.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Sat Oct 22 03:51:12 1994 +0000
+++ b/src/dispnew.c	Sat Oct 22 03:54:14 1994 +0000
@@ -1886,6 +1886,10 @@
   FOR_EACH_FRAME (tail, frame)
     if (!EQ (*vecp++, frame))
       goto changed;
+  /* Check that the buffer info matches.
+     No need to test for the end of the vector
+     because the last element of the vector is lambda
+     and that will always cause a mismatch.  */
   for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
     {
       buf = XCONS (XCONS (tail)->car)->cdr;
@@ -1896,8 +1900,11 @@
       if (!EQ (*vecp++, Fbuffer_modified_p (buf)))
 	goto changed;
     }
-  return Qnil;
+  /* Detect deletion of a buffer at the end of the list.  */
+  if (*vecp == Qlambda)
+    return Qnil;
  changed:
+  /* Start with 1 so there is room for at least on lambda at the end.  */
   n = 1;
   FOR_EACH_FRAME (tail, frame)
     n++;