Mercurial > emacs
diff src/buffer.c @ 91781:a6047ef14f4c
(clone_per_buffer_values, reset_buffer_local_variables)
(Fbuffer_local_value, Fbuffer_local_variables): Don't forget undo_list.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 11 Feb 2008 17:56:13 +0000 |
parents | 9f409926e851 |
children | 4a11735d1bdb |
line wrap: on
line diff
--- a/src/buffer.c Mon Feb 11 17:54:46 2008 +0000 +++ b/src/buffer.c Mon Feb 11 17:56:13 2008 +0000 @@ -496,7 +496,9 @@ XSETBUFFER (to_buffer, to); - for (offset = PER_BUFFER_VAR_OFFSET (name) + sizeof (Lisp_Object); + /* 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); offset < sizeof *to; offset += sizeof (Lisp_Object)) { @@ -808,7 +810,9 @@ /* For each slot that has a default value, copy that into the slot. */ - for (offset = PER_BUFFER_VAR_OFFSET (name); + /* 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); offset < sizeof *b; offset += sizeof (Lisp_Object)) { @@ -940,7 +944,9 @@ int found = 0; /* Look in special slots */ - for (offset = PER_BUFFER_VAR_OFFSET (name); + /* 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); offset < sizeof (struct buffer); /* sizeof EMACS_INT == sizeof Lisp_Object */ offset += (sizeof (EMACS_INT))) @@ -1051,7 +1057,9 @@ { int offset, idx; - for (offset = PER_BUFFER_VAR_OFFSET (name); + /* 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); offset < sizeof (struct buffer); /* sizeof EMACS_INT == sizeof Lisp_Object */ offset += (sizeof (EMACS_INT)))