From cb581a672b346e4896b2dee85cb2e23dfa2bca24 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 15 Jun 2011 14:39:04 -0400 Subject: [PATCH] * lisp/emacs-lisp/debug.el (debug): Don't leave the buffer in Debugger. --- lisp/ChangeLog | 9 +++++---- lisp/emacs-lisp/debug.el | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 03b96ecfa0b..f9705822a1e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,13 +1,14 @@ 2011-06-15 Stefan Monnier + * emacs-lisp/debug.el (debug): Don't leave the buffer in Debugger. + * abbrev.el (define-abbrev-table): Don't add a table multiple times. 2011-06-15 Alan Mackenzie - * progmodes/cc-fonts.el (c-font-lock-declarations): 1: Whilst - checking for declarators, disable knr checking to speed up for - normal files. 2: Refactor, replacing a sequence of nested if - forms by a cond form. + * progmodes/cc-fonts.el (c-font-lock-declarations): 1: Whilst checking + for declarators, disable knr checking to speed up for normal files. + 2: Refactor, replacing a sequence of nested if forms by a cond form. 2011-06-15 Lars Magne Ingebrigtsen diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 28962595ace..2fa339e62fe 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -238,13 +238,14 @@ first will be printed into the backtrace buffer." (kill-buffer debugger-buffer))) ;; Restore the previous state of the debugger-buffer, in case we were ;; in a recursive invocation of the debugger. - (when (and debugger-previous-state - (buffer-live-p debugger-buffer)) + (when (buffer-live-p debugger-buffer) (with-current-buffer debugger-buffer (let ((inhibit-read-only t)) (erase-buffer) - (insert (nth 1 debugger-previous-state)) - (funcall (nth 0 debugger-previous-state))))) + (if (null debugger-previous-state) + (fundamental-mode) + (insert (nth 1 debugger-previous-state)) + (funcall (nth 0 debugger-previous-state)))))) (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) ;; Put into effect the modified values of these variables -- 2.39.2