]> git.eshelyaron.com Git - emacs.git/commit
Don't rely on dynamic scoping to fix bug#59213
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 18 Feb 2023 17:56:24 +0000 (12:56 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 18 Feb 2023 17:56:24 +0000 (12:56 -0500)
commit750bc57cbb8d081566e671e8fc3e27a82588c197
treec5b762e170760a1453b2c279663fdadabedc32a7
parent2ac8d7e64a08ea6e22bb90ad16e2880440fbcf16
Don't rely on dynamic scoping to fix bug#59213

Rather than look up a dynamically scoped var to decide whether to trim
closures, use an ad-hoc marker on those closures which should not be trimmed.

* lisp/emacs-lisp/cconv.el (cconv-dont-trim-unused-variables): Delete var.
(cconv-make-interpreted-closure): Use a `:closure-dont-trim-context`
markers instead.

* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Use
`:closure-dont-trim-context` rather than `cconv-dont-trim-unused-variables`.

* lisp/emacs-lisp/testcover.el (testcover-analyze-coverage): Remove
workaround for `cconv-dont-trim-unused-variables`.

* test/lisp/emacs-lisp/cconv-tests.el (cconv-safe-for-space): New test.
lisp/emacs-lisp/cconv.el
lisp/emacs-lisp/edebug.el
lisp/emacs-lisp/testcover.el
test/lisp/emacs-lisp/cconv-tests.el