]> git.eshelyaron.com Git - emacs.git/commit
src/eval.c: Fix bug#62419
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Apr 2023 21:45:58 +0000 (17:45 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Apr 2023 21:45:58 +0000 (17:45 -0400)
commit5223762e02ac84eee984cd1f7a17865766cdad9a
tree379f3431cbf74fc73afc5fe89314bc98d1db762b
parent00144fa287eb168c1ba8e411e43fe13b9d2732ac
src/eval.c: Fix bug#62419

Yup, almost 40 years after ELisp first combined them, buffer-local
and let bindings still don't work quite right :-(

The "automatically buffer-local if set" semantics should follow the
principle that it becomes buffer-local iff the var's current binding
refers to the top-level/global/non-let binding.

* src/eval.c (let_shadows_buffer_binding_p): Disregard non-global
let-bindings.

* test/src/eval-tests.el (eval-test--bug62419): New test.
src/eval.c
test/src/eval-tests.el