]> git.eshelyaron.com Git - emacs.git/commit
(macroexp--with-extended-form-stack): Use plain `let`
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 26 Dec 2023 04:55:53 +0000 (23:55 -0500)
committerEshel Yaron <me@eshelyaron.com>
Fri, 5 Jan 2024 08:20:01 +0000 (09:20 +0100)
commit63267aa65231d94781a4ab1d1e7f6a4430e4b513
tree3d3b7dc50fe49da3e4798a8807d2935f512a94d7
parent6b4801147beeadf6b7bb46e1b2051c5bcbbea610
(macroexp--with-extended-form-stack): Use plain `let`

`macroexp--with-extended-form-stack` used manual push/pop so that upon
non-local exits the "deeper" value is kept, so the error handler gets
to know what was the deeper value, so as to be able to compute more
precise error locations.
Replace this with a `handler-bind` which catches that "deeper" value
more explicitly.

* lisp/emacs-lisp/bytecomp.el (bytecomp--displaying-warnings):
Use `handler-bind` to catch the value of `byte-compile-form-stack`
at the time of the error.  Also consolidate the duplicated code.

* lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack):
Use a plain dynbound let-rebinding.

(cherry picked from commit a5dcc1abea32abc906abfb66599c280b01d6ba27)
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/macroexp.el