Mercurial > emacs
comparison lisp/emacs-lisp/debug.el @ 63092:80ef8a2a052d
(debug): Don't bury the buffer unless it's in a dedicated window.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 06 Jun 2005 19:47:05 +0000 |
parents | b9209f1855ae |
children | 95e4ef649d27 |
comparison
equal
deleted
inserted
replaced
63091:81d7efcce2ff | 63092:80ef8a2a052d |
---|---|
219 ;; don't try to execute debugger commands in an invalid context. | 219 ;; don't try to execute debugger commands in an invalid context. |
220 (if (get-buffer-window debugger-buffer 0) | 220 (if (get-buffer-window debugger-buffer 0) |
221 ;; Still visible despite the save-window-excursion? Maybe it | 221 ;; Still visible despite the save-window-excursion? Maybe it |
222 ;; it's in a pop-up frame. It would be annoying to delete and | 222 ;; it's in a pop-up frame. It would be annoying to delete and |
223 ;; recreate it every time the debugger stops, so instead we'll | 223 ;; recreate it every time the debugger stops, so instead we'll |
224 ;; erase it and hide it but keep it alive. | 224 ;; erase it (and maybe hide it) but keep it alive. |
225 (with-current-buffer debugger-buffer | 225 (with-current-buffer debugger-buffer |
226 (erase-buffer) | 226 (erase-buffer) |
227 (fundamental-mode) | 227 (fundamental-mode) |
228 (with-selected-window (get-buffer-window debugger-buffer 0) | 228 (with-selected-window (get-buffer-window debugger-buffer 0) |
229 (bury-buffer))) | 229 (when (window-dedicated-p (selected-window)) |
230 ;; If the window is not dedicated, burying the buffer | |
231 ;; will mean that the frame created for it is left | |
232 ;; around showing smoe random buffer, and next time we | |
233 ;; pop to the debugger buffer we'll create yet | |
234 ;; another frame. | |
235 (bury-buffer)))) | |
230 (kill-buffer debugger-buffer)) | 236 (kill-buffer debugger-buffer)) |
231 (set-match-data debugger-outer-match-data))) | 237 (set-match-data debugger-outer-match-data))) |
232 ;; Put into effect the modified values of these variables | 238 ;; Put into effect the modified values of these variables |
233 ;; in case the user set them with the `e' command. | 239 ;; in case the user set them with the `e' command. |
234 (setq load-read-function debugger-outer-load-read-function) | 240 (setq load-read-function debugger-outer-load-read-function) |