summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-06-11 16:25:03 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-06-11 16:25:03 +0000
commit4b7cdc0edd1ecc6e35071cd728005e84c378652b (patch)
treef75f0de1ab380bea3cf47bf4e254064f80b601c3 /src/buffer.c
parentf7ed19a3eea686986704220f2ca7295e2fbf8d44 (diff)
downloademacs-4b7cdc0edd1ecc6e35071cd728005e84c378652b.tar.gz
(clone_per_buffer_values): Skip `name'.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index bafcb020e8d..04786dcfa86 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -496,12 +496,16 @@ clone_per_buffer_values (from, to)
/* buffer-local Lisp variables start at `undo_list',
tho only the ones from `name' on are GC'd normally. */
- for (offset = PER_BUFFER_VAR_OFFSET (undo_list) + sizeof (Lisp_Object);
+ for (offset = PER_BUFFER_VAR_OFFSET (undo_list);
offset < sizeof *to;
offset += sizeof (Lisp_Object))
{
Lisp_Object obj;
+ /* Don't touch the `name' which should be unique for every buffer. */
+ if (offset == PER_BUFFER_VAR_OFFSET (name))
+ continue;
+
obj = PER_BUFFER_VALUE (from, offset);
if (MARKERP (obj))
{