]> git.eshelyaron.com Git - emacs.git/commitdiff
Protect *Backtrace* from being killed (Bug#26650)
authorNoam Postavsky <npostavs@gmail.com>
Tue, 25 Apr 2017 12:39:17 +0000 (08:39 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 24 May 2017 00:11:23 +0000 (20:11 -0400)
* lisp/emacs-lisp/debug.el (debugger-mode): Call `top-level' in
`kill-buffer-hook'.

lisp/emacs-lisp/debug.el

index cb77148c28543fb7f7f99868514d565a86f1198d..83456fc31a2ac4e97abf7809e8092979d76c2857 100644 (file)
@@ -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))
 \f
 (defcustom debugger-record-buffer "*Debugger-record*"