aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-10-17 09:22:23 +0400
committerDmitry Antipov2012-10-17 09:22:23 +0400
commitd556ebf9b8a36596d752e284d227173c852d4eb8 (patch)
tree07a51d0d0fcbeb4b9df8bd8645a53e0c909e34ff /src/buffer.c
parentf0863a54681cfe7d40a0844bd2ce812eed408002 (diff)
downloademacs-d556ebf9b8a36596d752e284d227173c852d4eb8.tar.gz
emacs-d556ebf9b8a36596d752e284d227173c852d4eb8.zip
* buffer.c (Fkill_buffer): When unchaining the marker,
reset it's buffer pointer to NULL (Bug#12652).
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8e77db66d43..0b3dde27968 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1881,19 +1881,20 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1881 1881
1882 if (b->base_buffer) 1882 if (b->base_buffer)
1883 { 1883 {
1884 { /* Unchain all markers that belong to this indirect buffer. 1884 /* Unchain all markers that belong to this indirect buffer.
1885 Don't unchain the markers that belong to the base buffer 1885 Don't unchain the markers that belong to the base buffer
1886 or its other indirect buffers. */ 1886 or its other indirect buffers. */
1887 struct Lisp_Marker **mp; 1887 struct Lisp_Marker **mp = &BUF_MARKERS (b);
1888 for (mp = &BUF_MARKERS (b); *mp; ) 1888 while ((m = *mp))
1889 { 1889 {
1890 struct Lisp_Marker *m = *mp; 1890 if (m->buffer == b)
1891 if (m->buffer == b) 1891 {
1892 m->buffer = NULL;
1892 *mp = m->next; 1893 *mp = m->next;
1893 else 1894 }
1894 mp = &m->next; 1895 else
1895 } 1896 mp = &m->next;
1896 } 1897 }
1897 } 1898 }
1898 else 1899 else
1899 { 1900 {