From 51615a808236058ac732a5eaba239874d56fdd10 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Thu, 12 Oct 2017 22:59:53 -0400 Subject: [PATCH] Don't remember old debugger window (Bug#17882) * lisp/emacs-lisp/debug.el (debug): Unset debugger-previous-window when `debugger-will-be-back' is nil. --- lisp/emacs-lisp/debug.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 0247179a843..6c754615b00 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -253,7 +253,9 @@ first will be printed into the backtrace buffer." ;; Unshow debugger-buffer. (quit-restore-window debugger-window debugger-bury-or-kill) ;; Restore current buffer (Bug#12502). - (set-buffer debugger-old-buffer)))) + (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 and put it into fundamental mode. -- 2.39.2