Leave the contents on the *Backtrace* buffer on `q'
* lisp/emacs-lisp/debug.el (debug): Don't clear the contents of the buffer on `q' (bug#55863).
This commit is contained in:
parent
bea90d8de2
commit
a02bb84c80
2 changed files with 12 additions and 6 deletions
7
etc/NEWS
7
etc/NEWS
|
@ -997,6 +997,13 @@ inadvertently delete the "*scratch*" buffer.
|
|||
|
||||
** Debugging
|
||||
|
||||
---
|
||||
*** 'q' in a *Backtrace* buffer no longer clears the buffer.
|
||||
Instead it just buries the buffer and switches the mode from
|
||||
'debugger-mode' to 'backtrace-mode', since commands like 'e' are no
|
||||
longer available after exiting the recursive edit.
|
||||
|
||||
+++
|
||||
*** New user option 'debug-allow-recursive-debug'.
|
||||
This user option controls whether the 'e' (in a "*Backtrace*"
|
||||
buffer or while edebugging) and 'C-x C-e' (while edebugging) commands
|
||||
|
|
|
@ -305,16 +305,15 @@ the debugger will not be entered."
|
|||
(set-buffer debugger-old-buffer)))
|
||||
;; Forget debugger window, it won't be back (Bug#17882).
|
||||
(setq debugger-previous-window nil))
|
||||
;; Restore previous state of debugger-buffer in case we were
|
||||
;; in a recursive invocation of the debugger, otherwise just
|
||||
;; erase the buffer.
|
||||
;; Restore previous state of debugger-buffer in case we
|
||||
;; were in a recursive invocation of the debugger,
|
||||
;; otherwise just exit (after changing the mode, since we
|
||||
;; can't interact with the buffer in the same way).
|
||||
(when (buffer-live-p debugger-buffer)
|
||||
(with-current-buffer debugger-buffer
|
||||
(if debugger-previous-state
|
||||
(debugger--restore-buffer-state debugger-previous-state)
|
||||
(setq backtrace-insert-header-function nil)
|
||||
(setq backtrace-frames nil)
|
||||
(backtrace-print))))
|
||||
(backtrace-mode))))
|
||||
(with-timeout-unsuspend debugger-with-timeout-suspend)
|
||||
(set-match-data debugger-outer-match-data)))
|
||||
(setq debug-on-next-call debugger-step-after-exit)
|
||||
|
|
Loading…
Add table
Reference in a new issue