diff options
| author | Richard M. Stallman | 1994-10-22 03:54:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-22 03:54:14 +0000 |
| commit | 50cf83f80f2bd17f263118efb74ee594ba9ad948 (patch) | |
| tree | e30735f738fd6a08fe17798cc2f0b3ab6a3cf87c | |
| parent | f1847de368bd4c9ec757371679ae1ac65d7e5e93 (diff) | |
| download | emacs-50cf83f80f2bd17f263118efb74ee594ba9ad948.tar.gz emacs-50cf83f80f2bd17f263118efb74ee594ba9ad948.zip | |
(Fframe_or_buffer_changed_p):
Detect deletion of a buffer at the end of the buffer list.
| -rw-r--r-- | src/dispnew.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index eb20a71a281..787092411a5 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1886,6 +1886,10 @@ the current state.\n") | |||
| 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; |
| @@ -1896,8 +1900,11 @@ the current state.\n") | |||
| 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++; |