]> git.eshelyaron.com Git - emacs.git/commitdiff
(debug): Don't bury the buffer unless it's in a dedicated window.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Jun 2005 19:47:05 +0000 (19:47 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Jun 2005 19:47:05 +0000 (19:47 +0000)
lisp/ChangeLog
lisp/emacs-lisp/debug.el

index 8c0c26c09fe6e1fdceb0f9de00f30544926b689f..d6cfeab3d089e7b40c003de52433bded8de0f5c5 100644 (file)
@@ -1,5 +1,8 @@
 2005-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * emacs-lisp/debug.el (debug): Don't bury the buffer unless it's in
+       a dedicated window.
+
        * international/latexenc.el (latexenc-find-file-coding-system):
        Undo part of last patch, to turn off a compiler warning.
 
index 7d7e066b4e80289d735b2b30acbab517d40a641f..30e6f3480cc0509768ae7ca49091db519fd4aa38 100644 (file)
@@ -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