summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/debug.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-04-25 08:39:17 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-05-23 20:11:23 -0400
commitef9f5c672a8e248dd7bd682101c03feb2e527340 (patch)
treed3da74cb32f0c51b3ee934026fab3407dec181ce /lisp/emacs-lisp/debug.el
parentd158629cb6d0dd7cf0227d993d59ea6faa4438c9 (diff)
downloademacs-ef9f5c672a8e248dd7bd682101c03feb2e527340.tar.gz
Protect *Backtrace* from being killed (Bug#26650)
* lisp/emacs-lisp/debug.el (debugger-mode): Call `top-level' in `kill-buffer-hook'.
Diffstat (limited to 'lisp/emacs-lisp/debug.el')
-rw-r--r--lisp/emacs-lisp/debug.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index cb77148c285..83456fc31a2 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -727,6 +727,9 @@ Complete list of commands:
\\{debugger-mode-map}"
(setq truncate-lines t)
(set-syntax-table emacs-lisp-mode-syntax-table)
+ (add-hook 'kill-buffer-hook
+ (lambda () (if (> (recursion-depth) 0) (top-level)))
+ nil t)
(use-local-map debugger-mode-map))
(defcustom debugger-record-buffer "*Debugger-record*"