summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/debug.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2005-06-06 19:47:05 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2005-06-06 19:47:05 +0000
commit532c188a19153c4517be3bde16890ffb2f4b0441 (patch)
tree590f25d5a996bd5473d555e61384ae4caf0e7ccd /lisp/emacs-lisp/debug.el
parenta15d6d35fad31a5956d77664bd05b8e3d1330fe8 (diff)
downloademacs-532c188a19153c4517be3bde16890ffb2f4b0441.tar.gz
(debug): Don't bury the buffer unless it's in a dedicated window.
Diffstat (limited to 'lisp/emacs-lisp/debug.el')
-rw-r--r--lisp/emacs-lisp/debug.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 7d7e066b4e8..30e6f3480cc 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -221,12 +221,18 @@ first will be printed into the backtrace buffer."
;; Still visible despite the save-window-excursion? Maybe it
;; it's in a pop-up frame. It would be annoying to delete and
;; recreate it every time the debugger stops, so instead we'll
- ;; erase it and hide it but keep it alive.
+ ;; erase it (and maybe hide it) but keep it alive.
(with-current-buffer debugger-buffer
(erase-buffer)
(fundamental-mode)
(with-selected-window (get-buffer-window debugger-buffer 0)
- (bury-buffer)))
+ (when (window-dedicated-p (selected-window))
+ ;; If the window is not dedicated, burying the buffer
+ ;; will mean that the frame created for it is left
+ ;; around showing smoe random buffer, and next time we
+ ;; pop to the debugger buffer we'll create yet
+ ;; another frame.
+ (bury-buffer))))
(kill-buffer debugger-buffer))
(set-match-data debugger-outer-match-data)))
;; Put into effect the modified values of these variables