changeset 61445:9ee6093ffeaf

(Fmake_indirect_buffer): Clear out some local variables.
author Richard M. Stallman <rms@gnu.org>
date Sun, 10 Apr 2005 23:22:38 +0000
parents 8e54037fa085
children 397fed153f02
files src/buffer.c
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Sun Apr 10 22:02:41 2005 +0000
+++ b/src/buffer.c	Sun Apr 10 23:22:38 2005 +0000
@@ -630,7 +630,21 @@
       XMARKER (b->zv_marker)->insertion_type = 1;
     }
   else
-    clone_per_buffer_values (b->base_buffer, b);
+    {
+      struct buffer *old_b = current_buffer;
+
+      clone_per_buffer_values (b->base_buffer, b);
+      b->filename = Qnil;
+      b->file_truename = Qnil;
+      b->display_count = make_number (0);
+      b->backed_up = Qnil;
+      b->auto_save_file_name = Qnil;
+      set_buffer_internal_1 (b);
+      Fset (intern ("buffer-save-without-query"), Qnil);
+      Fset (intern ("buffer-file-number"), Qnil);
+      Fset (intern ("buffer-stale-function"), Qnil);
+      set_buffer_internal_1 (old_b);
+    }
 
   return buf;
 }
@@ -931,7 +945,7 @@
 }
 
 /* Return an alist of the Lisp-level buffer-local bindings of
-   buffer BUF.  That is, do't include  the variables maintained
+   buffer BUF.  That is, don't include the variables maintained
    in special slots in the buffer object.  */
 
 static Lisp_Object