Mercurial > emacs
comparison src/buffer.c @ 2486:d5d7e6996604
(Fkill_all_local_variables): Store each var's current value
in the buffer's alist entry, before reverting to the default value.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Thu, 08 Apr 1993 07:10:42 +0000 |
| parents | 6f4b9c548425 |
| children | 3aa2f3b35353 |
comparison
equal
deleted
inserted
replaced
| 2485:c34bbe650160 | 2486:d5d7e6996604 |
|---|---|
| 1147 { | 1147 { |
| 1148 /* Symbol is set up for this buffer's old local value. | 1148 /* Symbol is set up for this buffer's old local value. |
| 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 } |
| 1157 } | 1165 } |
| 1158 | 1166 |
