]> git.eshelyaron.com Git - emacs.git/commit
Move batch backtrace code to `top_level_2`
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 21 Dec 2023 04:31:39 +0000 (23:31 -0500)
committerEshel Yaron <me@eshelyaron.com>
Fri, 5 Jan 2024 08:19:38 +0000 (09:19 +0100)
commit6b4801147beeadf6b7bb46e1b2051c5bcbbea610
treef8c830cd76b3d3eaeb2a11ed379c92469c068841
parent131d05b989f82445f56dfeaebd1776202572103b
Move batch backtrace code to `top_level_2`

Move ad-hoc code meant to ease debugging of bootstrap (and batch mode)
to `top_level_2` so it doesn't pollute `signal_or_quit`.

* src/lisp.h (pop_handler, push_handler_bind): Declare.
* src/keyboard.c (top_level_2): Setup an error handler to call
`debug-early` when noninteractive.
* src/eval.c (pop_handler): Not static any more.
(signal_or_quit): Remove special case for noninteractive use.
(push_handler_bind): New function, extracted from `Fhandler_bind_1`.
(Fhandler_bind_1): Use it.
(syms_of_eval): Declare `Qdebug_early__handler`.
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Weed out
frames below `debug-early`.
(debug-early--handler): New function.

(cherry picked from commit 604e34338f3b5a31439020c6704f9f9d07d17d69)
lisp/emacs-lisp/debug-early.el
src/eval.c
src/keyboard.c
src/lisp.h