]> git.eshelyaron.com Git - emacs.git/commit
Fix bug#30846, along with misc cleanups found along the way
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 23 Mar 2018 15:29:06 +0000 (11:29 -0400)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:17:58 +0000 (14:17 +0800)
commit709e1da37328d2f97fd5a5efec3179dfe14a74fc
tree3e38559496fc6ed7fed68555129a81623c950215
parent7985c8786732ed90bba75f74b924384686f1afdc
Fix bug#30846, along with misc cleanups found along the way

* test/src/data-tests.el (data-tests-kill-all-local-variables): New test.

* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.

* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.

* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.
src/alloc.c
src/buffer.c
src/data.c
src/lisp.h
test/src/data-tests.el