diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c index eaa3d94de34..1e1bd933f93 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -153,7 +153,7 @@ static void alloc_buffer_text (struct buffer *, ptrdiff_t); | |||
| 153 | static void free_buffer_text (struct buffer *b); | 153 | static void free_buffer_text (struct buffer *b); |
| 154 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); | 154 | static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); |
| 155 | static void modify_overlay (struct buffer *, ptrdiff_t, ptrdiff_t); | 155 | static void modify_overlay (struct buffer *, ptrdiff_t, ptrdiff_t); |
| 156 | static Lisp_Object buffer_lisp_local_variables (struct buffer *); | 156 | static Lisp_Object buffer_lisp_local_variables (struct buffer *, int); |
| 157 | 157 | ||
| 158 | /* For debugging; temporary. See set_buffer_internal. */ | 158 | /* For debugging; temporary. See set_buffer_internal. */ |
| 159 | /* Lisp_Object Qlisp_mode, Vcheck_symbol; */ | 159 | /* Lisp_Object Qlisp_mode, Vcheck_symbol; */ |
| @@ -487,7 +487,7 @@ clone_per_buffer_values (struct buffer *from, struct buffer *to) | |||
| 487 | 487 | ||
| 488 | /* Get (a copy of) the alist of Lisp-level local variables of FROM | 488 | /* Get (a copy of) the alist of Lisp-level local variables of FROM |
| 489 | and install that in TO. */ | 489 | and install that in TO. */ |
| 490 | BVAR (to, local_var_alist) = buffer_lisp_local_variables (from); | 490 | BVAR (to, local_var_alist) = buffer_lisp_local_variables (from, 1); |
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | 493 | ||
| @@ -1012,10 +1012,12 @@ buffer_local_value_1 (Lisp_Object variable, Lisp_Object buffer) | |||
| 1012 | 1012 | ||
| 1013 | /* Return an alist of the Lisp-level buffer-local bindings of | 1013 | /* Return an alist of the Lisp-level buffer-local bindings of |
| 1014 | buffer BUF. That is, don't include the variables maintained | 1014 | buffer BUF. That is, don't include the variables maintained |
| 1015 | in special slots in the buffer object. */ | 1015 | in special slots in the buffer object. |
| 1016 | If CLONE is zero elements of the form (VAR . unbound) are replaced | ||
| 1017 | by VAR. */ | ||
| 1016 | 1018 | ||
| 1017 | static Lisp_Object | 1019 | static Lisp_Object |
| 1018 | buffer_lisp_local_variables (struct buffer *buf) | 1020 | buffer_lisp_local_variables (struct buffer *buf, int clone) |
| 1019 | { | 1021 | { |
| 1020 | Lisp_Object result = Qnil; | 1022 | Lisp_Object result = Qnil; |
| 1021 | register Lisp_Object tail; | 1023 | register Lisp_Object tail; |
| @@ -1035,7 +1037,7 @@ buffer_lisp_local_variables (struct buffer *buf) | |||
| 1035 | if (buf != current_buffer) | 1037 | if (buf != current_buffer) |
| 1036 | val = XCDR (elt); | 1038 | val = XCDR (elt); |
| 1037 | 1039 | ||
| 1038 | result = Fcons (EQ (val, Qunbound) | 1040 | result = Fcons (!clone && EQ (val, Qunbound) |
| 1039 | ? XCAR (elt) | 1041 | ? XCAR (elt) |
| 1040 | : Fcons (XCAR (elt), val), | 1042 | : Fcons (XCAR (elt), val), |
| 1041 | result); | 1043 | result); |
| @@ -1064,7 +1066,7 @@ No argument or nil as argument means use current buffer as BUFFER. */) | |||
| 1064 | buf = XBUFFER (buffer); | 1066 | buf = XBUFFER (buffer); |
| 1065 | } | 1067 | } |
| 1066 | 1068 | ||
| 1067 | result = buffer_lisp_local_variables (buf); | 1069 | result = buffer_lisp_local_variables (buf, 0); |
| 1068 | 1070 | ||
| 1069 | /* Add on all the variables stored in special slots. */ | 1071 | /* Add on all the variables stored in special slots. */ |
| 1070 | { | 1072 | { |