diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-16 23:10:48 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-16 23:10:48 -0400 |
commit | 445e2499baa1b8ef21e8edcc13692b5d78912922 (patch) | |
tree | 0be2a8e5971f97a48aad835b8fe96390230670f0 /lisp/emacs-lisp/regexp-opt.el | |
parent | ad3a3ad6e616a53ec5ae28aed02e8d3461a5ce5c (diff) | |
download | emacs-445e2499baa1b8ef21e8edcc13692b5d78912922.tar.gz emacs-445e2499baa1b8ef21e8edcc13692b5d78912922.tar.bz2 emacs-445e2499baa1b8ef21e8edcc13692b5d78912922.zip |
debug.el: Prevent re-entering the debugger for the same error
We can have several active `handler-bind`s that all want to invoke the
debugger, in which case we can have the following sequence:
- The more deeply nested handler calls the debugger.
- After a while the user invokes `debugger-continue`.
- `signal_or_quit` propagates the error up the stack to the
second handler, which calls the debugger again.
- The user thus ends up right back at the same place, as if
`debugger-continue` had not be processed.
Fix this by remembering the last processed error and skipping
the debugger if we bump into it again.
* lisp/emacs-lisp/debug.el (debugger--last-error): New var.
(debugger--duplicate-p): New function.
(debug): Use them.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
0 files changed, 0 insertions, 0 deletions