]> git.eshelyaron.com Git - emacs.git/commit
Make edebug see unused variables when lexical-binding is non-nil
authorAlan Mackenzie <acm@muc.de>
Sat, 11 Feb 2023 10:45:31 +0000 (10:45 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 11 Feb 2023 10:45:31 +0000 (10:45 +0000)
commitdc3604cadfa8f4bc3e5d9346029e48b4268fcd60
tree7695f40301539cb9b32c2422d7859410dec1c2d8
parentdbe7803aa1e8249bd70f67f25f19aedabeb9cc22
Make edebug see unused variables when lexical-binding is non-nil

This fixes bug #59213.

* lisp/emacs-lisp/cconv.el (cconv-dont-trim-unused-variables): New variable.
(cconv-fv, cconv-make-interpreted-closure): Add/amend doc strings.
(cconv-make-interpreted-closure): Test cconv-dont-trim-unused-variables, and
if non-nil, don't "optimize" the lexical environment.

* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Compile a binding of
cconv-dont-trim-unused-variables to t around the call of edebug-enter.

* lisp/emacs-lisp/testconver.el (testcover-analyze-coverage): Add a new arm to
the pcase form to handle the new form of edebug-enter.
lisp/emacs-lisp/cconv.el
lisp/emacs-lisp/edebug.el
lisp/emacs-lisp/testcover.el