[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116090: * buffer.c (Fkill_buffer): When killing an
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r116090: * buffer.c (Fkill_buffer): When killing an indirect buffer, |
Date: |
Tue, 21 Jan 2014 02:30:43 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116090
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2014-01-21 06:28:57 +0400
message:
* 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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/buffer.c buffer.c-20091113204419-o5vbwnq5f7feedwu-264
src/intervals.c intervals.c-20091113204419-o5vbwnq5f7feedwu-519
src/intervals.h intervals.h-20091113204419-o5vbwnq5f7feedwu-520
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-01-20 19:44:56 +0000
+++ b/src/ChangeLog 2014-01-21 02:28:57 +0000
@@ -1,3 +1,10 @@
+2014-01-21 Dmitry Antipov <address@hidden>
+
+ * 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.
+
2014-01-20 Paul Eggert <address@hidden>
Avoid undefined behavior by initializing buffer redisplay bit.
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2014-01-20 16:55:28 +0000
+++ b/src/buffer.c 2014-01-21 02:28:57 +0000
@@ -1868,6 +1868,7 @@
if (b->base_buffer)
{
+ INTERVAL i;
/* Unchain all markers that belong to this indirect buffer.
Don't unchain the markers that belong to the base buffer
or its other indirect buffers. */
@@ -1882,6 +1883,14 @@
else
mp = &m->next;
}
+ /* Intervals should be owned by the base buffer (Bug#16502). */
+ i = buffer_intervals (b);
+ if (i)
+ {
+ Lisp_Object owner;
+ XSETBUFFER (owner, b->base_buffer);
+ set_interval_object (i, owner);
+ }
}
else
{
=== modified file 'src/intervals.c'
--- a/src/intervals.c 2014-01-01 07:43:34 +0000
+++ b/src/intervals.c 2014-01-21 02:28:57 +0000
@@ -60,16 +60,7 @@
/* Utility functions for intervals. */
-/* Use these functions to set Lisp_Object
- or pointer slots of struct interval. */
-
-static void
-set_interval_object (INTERVAL i, Lisp_Object obj)
-{
- eassert (BUFFERP (obj) || STRINGP (obj));
- i->up_obj = 1;
- i->up.obj = obj;
-}
+/* Use these functions to set pointer slots of struct interval. */
static void
set_interval_left (INTERVAL i, INTERVAL left)
=== modified file 'src/intervals.h'
--- a/src/intervals.h 2014-01-01 07:43:34 +0000
+++ b/src/intervals.h 2014-01-21 02:28:57 +0000
@@ -134,6 +134,14 @@
or pointer slots of struct interval. */
INLINE void
+set_interval_object (INTERVAL i, Lisp_Object obj)
+{
+ eassert (BUFFERP (obj) || STRINGP (obj));
+ i->up_obj = 1;
+ i->up.obj = obj;
+}
+
+INLINE void
set_interval_parent (INTERVAL i, INTERVAL parent)
{
i->up_obj = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116090: * buffer.c (Fkill_buffer): When killing an indirect buffer,,
Dmitry Antipov <=