From: Richard M. Stallman Date: Sat, 22 May 2004 22:20:51 +0000 (+0000) Subject: (clone_per_buffer_values): Copy the alist of local vars, X-Git-Tag: ttn-vms-21-2-B4~6090 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=02f28bbdceb3cad843308d9ad0386ff5c492db9c;p=emacs.git (clone_per_buffer_values): Copy the alist of local vars, and the alist pairs too. --- diff --git a/src/buffer.c b/src/buffer.c index 7560e696685..532a768ba50 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -487,7 +487,7 @@ static void clone_per_buffer_values (from, to) struct buffer *from, *to; { - Lisp_Object to_buffer; + Lisp_Object to_buffer, tem; int offset; XSETBUFFER (to_buffer, to); @@ -514,6 +514,14 @@ clone_per_buffer_values (from, to) to->overlays_before = copy_overlays (to, from->overlays_before); to->overlays_after = copy_overlays (to, from->overlays_after); + + /* Copy the alist of local variables, + and all the alist elements too. */ + to->local_var_alist + = Fcopy_sequence (from->local_var_alist); + for (tem = to->local_var_alist; CONSP (tem); + tem = XCDR (tem)) + XSETCAR (tem, Fcons (XCAR (XCAR (tem)), XCDR (XCAR (tem)))); }