aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index ac14ec9c37c..88ef34070ea 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -156,7 +156,7 @@ static void alloc_buffer_text (struct buffer *, ptrdiff_t);
156static void free_buffer_text (struct buffer *b); 156static void free_buffer_text (struct buffer *b);
157static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); 157static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *);
158static void modify_overlay (struct buffer *, EMACS_INT, EMACS_INT); 158static void modify_overlay (struct buffer *, EMACS_INT, EMACS_INT);
159static Lisp_Object buffer_lisp_local_variables (struct buffer *); 159static Lisp_Object buffer_lisp_local_variables (struct buffer *, int);
160 160
161/* For debugging; temporary. See set_buffer_internal. */ 161/* For debugging; temporary. See set_buffer_internal. */
162/* Lisp_Object Qlisp_mode, Vcheck_symbol; */ 162/* Lisp_Object Qlisp_mode, Vcheck_symbol; */
@@ -505,7 +505,7 @@ clone_per_buffer_values (struct buffer *from, struct buffer *to)
505 505
506 /* Get (a copy of) the alist of Lisp-level local variables of FROM 506 /* Get (a copy of) the alist of Lisp-level local variables of FROM
507 and install that in TO. */ 507 and install that in TO. */
508 BVAR (to, local_var_alist) = buffer_lisp_local_variables (from); 508 BVAR (to, local_var_alist) = buffer_lisp_local_variables (from, 1);
509} 509}
510 510
511 511
@@ -1003,10 +1003,12 @@ is the default binding of the variable. */)
1003 1003
1004/* Return an alist of the Lisp-level buffer-local bindings of 1004/* Return an alist of the Lisp-level buffer-local bindings of
1005 buffer BUF. That is, don't include the variables maintained 1005 buffer BUF. That is, don't include the variables maintained
1006 in special slots in the buffer object. */ 1006 in special slots in the buffer object.
1007 If CLONE is zero elements of the form (VAR . unbound) are replaced
1008 by VAR. */
1007 1009
1008static Lisp_Object 1010static Lisp_Object
1009buffer_lisp_local_variables (struct buffer *buf) 1011buffer_lisp_local_variables (struct buffer *buf, int clone)
1010{ 1012{
1011 Lisp_Object result = Qnil; 1013 Lisp_Object result = Qnil;
1012 register Lisp_Object tail; 1014 register Lisp_Object tail;
@@ -1026,7 +1028,7 @@ buffer_lisp_local_variables (struct buffer *buf)
1026 if (buf != current_buffer) 1028 if (buf != current_buffer)
1027 val = XCDR (elt); 1029 val = XCDR (elt);
1028 1030
1029 result = Fcons (EQ (val, Qunbound) 1031 result = Fcons (!clone && EQ (val, Qunbound)
1030 ? XCAR (elt) 1032 ? XCAR (elt)
1031 : Fcons (XCAR (elt), val), 1033 : Fcons (XCAR (elt), val),
1032 result); 1034 result);
@@ -1055,7 +1057,7 @@ No argument or nil as argument means use current buffer as BUFFER. */)
1055 buf = XBUFFER (buffer); 1057 buf = XBUFFER (buffer);
1056 } 1058 }
1057 1059
1058 result = buffer_lisp_local_variables (buf); 1060 result = buffer_lisp_local_variables (buf, 0);
1059 1061
1060 /* Add on all the variables stored in special slots. */ 1062 /* Add on all the variables stored in special slots. */
1061 { 1063 {