diff options
| author | Dmitry Antipov | 2014-01-21 06:28:57 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-01-21 06:28:57 +0400 |
| commit | 5004c3bfbb0e3bbaa7d91658eee04d2d4daef663 (patch) | |
| tree | 9a7b3d8971ee53751404a327b2387429bef6967a /src/buffer.c | |
| parent | 87503791212088cdb1d8d5cd916df9d2a8be1999 (diff) | |
| download | emacs-5004c3bfbb0e3bbaa7d91658eee04d2d4daef663.tar.gz emacs-5004c3bfbb0e3bbaa7d91658eee04d2d4daef663.zip | |
* buffer.c (Fkill_buffer): When killing an indirect buffer,
re-attach intervals to its base buffer (Bug#16502).
* intervals.c (set_interval_object): Move from here...
* intervals.h (set_interval_object): ... to here. Fix comments.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 8f557634b2a..33bd80d3f4f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1868,6 +1868,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1868 | 1868 | ||
| 1869 | if (b->base_buffer) | 1869 | if (b->base_buffer) |
| 1870 | { | 1870 | { |
| 1871 | INTERVAL i; | ||
| 1871 | /* Unchain all markers that belong to this indirect buffer. | 1872 | /* Unchain all markers that belong to this indirect buffer. |
| 1872 | Don't unchain the markers that belong to the base buffer | 1873 | Don't unchain the markers that belong to the base buffer |
| 1873 | or its other indirect buffers. */ | 1874 | or its other indirect buffers. */ |
| @@ -1882,6 +1883,14 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1882 | else | 1883 | else |
| 1883 | mp = &m->next; | 1884 | mp = &m->next; |
| 1884 | } | 1885 | } |
| 1886 | /* Intervals should be owned by the base buffer (Bug#16502). */ | ||
| 1887 | i = buffer_intervals (b); | ||
| 1888 | if (i) | ||
| 1889 | { | ||
| 1890 | Lisp_Object owner; | ||
| 1891 | XSETBUFFER (owner, b->base_buffer); | ||
| 1892 | set_interval_object (i, owner); | ||
| 1893 | } | ||
| 1885 | } | 1894 | } |
| 1886 | else | 1895 | else |
| 1887 | { | 1896 | { |