comparison src/dispnew.c @ 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 b36d5e88cccc
children e95b3647fb26
comparison
equal deleted inserted replaced
9649:910da93766c8 9650:4295137050dd
1884 int n; 1884 int n;
1885 vecp = XVECTOR (frame_and_buffer_state)->contents; 1885 vecp = XVECTOR (frame_and_buffer_state)->contents;
1886 FOR_EACH_FRAME (tail, frame) 1886 FOR_EACH_FRAME (tail, frame)
1887 if (!EQ (*vecp++, frame)) 1887 if (!EQ (*vecp++, frame))
1888 goto changed; 1888 goto changed;
1889 /* Check that the buffer info matches.
1890 No need to test for the end of the vector
1891 because the last element of the vector is lambda
1892 and that will always cause a mismatch. */
1889 for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr) 1893 for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
1890 { 1894 {
1891 buf = XCONS (XCONS (tail)->car)->cdr; 1895 buf = XCONS (XCONS (tail)->car)->cdr;
1892 if (!EQ (*vecp++, buf)) 1896 if (!EQ (*vecp++, buf))
1893 goto changed; 1897 goto changed;
1894 if (!EQ (*vecp++, XBUFFER (buf)->read_only)) 1898 if (!EQ (*vecp++, XBUFFER (buf)->read_only))
1895 goto changed; 1899 goto changed;
1896 if (!EQ (*vecp++, Fbuffer_modified_p (buf))) 1900 if (!EQ (*vecp++, Fbuffer_modified_p (buf)))
1897 goto changed; 1901 goto changed;
1898 } 1902 }
1899 return Qnil; 1903 /* Detect deletion of a buffer at the end of the list. */
1904 if (*vecp == Qlambda)
1905 return Qnil;
1900 changed: 1906 changed:
1907 /* Start with 1 so there is room for at least on lambda at the end. */
1901 n = 1; 1908 n = 1;
1902 FOR_EACH_FRAME (tail, frame) 1909 FOR_EACH_FRAME (tail, frame)
1903 n++; 1910 n++;
1904 for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr) 1911 for (tail = Vbuffer_alist; CONSP (tail); tail = XCONS (tail)->cdr)
1905 n += 3; 1912 n += 3;