aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRichard M. Stallman1993-04-08 07:10:42 +0000
committerRichard M. Stallman1993-04-08 07:10:42 +0000
commit542143d701e5dd09800bbe88498d626c9356c6fc (patch)
tree0e65e9de3291026e4c44155531eeafc00cecd50f /src/buffer.c
parent1db87953e5c8532ca725a72b5676b4a1005748f5 (diff)
downloademacs-542143d701e5dd09800bbe88498d626c9356c6fc.tar.gz
emacs-542143d701e5dd09800bbe88498d626c9356c6fc.zip
(Fkill_all_local_variables): Store each var's current value
in the buffer's alist entry, before reverting to the default value.
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 }