aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 118519f36ff..e927a27088c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1149,8 +1149,16 @@ a non-nil `permanent-local' property are not eliminated by this function.")
1149 Set it up for the current buffer with the default value. */ 1149 Set it up for the current buffer with the default value. */
1150 1150
1151 tem = XCONS (XCONS (XSYMBOL (sym)->value)->cdr)->cdr; 1151 tem = XCONS (XCONS (XSYMBOL (sym)->value)->cdr)->cdr;
1152 /* Store the symbol's current value into the alist entry
1153 it is currently set up for. This is so that, if the
1154 local is marked permanent, and we make it local again below,
1155 we don't lose the value. */
1156 XCONS (XCONS (tem)->car)->cdr = XCONS (XSYMBOL (sym)->value)->car;
1157 /* Switch to the symbol's default-value alist entry. */
1152 XCONS (tem)->car = tem; 1158 XCONS (tem)->car = tem;
1159 /* Mark it as current for the current buffer. */
1153 XCONS (XCONS (XSYMBOL (sym)->value)->cdr)->car = Fcurrent_buffer (); 1160 XCONS (XCONS (XSYMBOL (sym)->value)->cdr)->car = Fcurrent_buffer ();
1161 /* Store the current value into any forwarding in the symbol. */
1154 store_symval_forwarding (sym, XCONS (XSYMBOL (sym)->value)->car, 1162 store_symval_forwarding (sym, XCONS (XSYMBOL (sym)->value)->car,
1155 XCONS (tem)->cdr); 1163 XCONS (tem)->cdr);
1156 } 1164 }