Mercurial > emacs
changeset 63058:b9209f1855ae
(debugger-window): New variable.
(debug): Use debugger-window if it is set and still alive.
Record debugger-window for next entry.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 06 Jun 2005 12:29:57 +0000 |
parents | 3949ec3f5f5a |
children | ac70444b7205 |
files | lisp/emacs-lisp/debug.el |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/debug.el Mon Jun 06 12:27:44 2005 +0000 +++ b/lisp/emacs-lisp/debug.el Mon Jun 06 12:29:57 2005 +0000 @@ -97,6 +97,11 @@ This variable is used by `debugger-jump', `debugger-step-through', and `debugger-reenable' to temporarily disable debug-on-entry.") +(defvar debugger-window nil + "If non-nil, the last window used by the debugger for its buffer. +The next call to the debugger reuses the same window, if it is still live. +That case would normally occur when the window is in a separate frame.") + ;;;###autoload (setq debugger 'debug) ;;;###autoload @@ -178,7 +183,13 @@ ;; Place an extra debug-on-exit for macro's. (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) (backtrace-debug 5 t))) - (pop-to-buffer debugger-buffer) + (if (and debugger-window + (window-live-p debugger-window)) + (progn + (set-window-buffer debugger-window debugger-buffer) + (select-window debugger-window)) + (pop-to-buffer debugger-buffer)) + (setq debugger-window (selected-window)) (debugger-mode) (debugger-setup-buffer debugger-args) (when noninteractive