Commit 88ded8ac authored by Martin Rudalics's avatar Martin Rudalics
Browse files

In debug restore window configuration when debugger-will-be-back is non-nil (Bug#12623).

* emacs-lisp/debug.el (debug): When debugger-will-be-back is
non-nil, restore window configuration (Bug#12623).
parent 73f2b4ab
2012-10-13 Martin Rudalics <rudalics@gmx.at>
* emacs-lisp/debug.el (debug): When debugger-will-be-back is
non-nil, restore window configuration (Bug#12623).
2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
 
* help-fns.el (describe-variable, describe-function-1):
......
......@@ -213,7 +213,8 @@ first will be printed into the backtrace buffer."
(or enable-recursive-minibuffers (> (minibuffer-depth) 0)))
(standard-input t) (standard-output t)
inhibit-redisplay
(cursor-in-echo-area nil))
(cursor-in-echo-area nil)
(window-configuration (current-window-configuration)))
(unwind-protect
(save-excursion
(when (eq (car debugger-args) 'debug)
......@@ -266,16 +267,19 @@ first will be printed into the backtrace buffer."
;; Make sure we unbind buffer-read-only in the right buffer.
(save-excursion
(recursive-edit))))
(when (and (not debugger-will-be-back)
(window-live-p debugger-window)
(eq (window-buffer debugger-window) debugger-buffer))
;; Record height of debugger window.
(setq debugger-previous-window-height
(window-total-size debugger-window))
;; Unshow debugger-buffer.
(quit-restore-window debugger-window debugger-bury-or-kill)
;; Restore current buffer (Bug#12502).
(set-buffer debugger-old-buffer))
(if debugger-will-be-back
;; Restore previous window configuration (Bug#12623).
(set-window-configuration window-configuration)
(when (and (window-live-p debugger-window)
(eq (window-buffer debugger-window) debugger-buffer))
(progn
;; Record height of debugger window.
(setq debugger-previous-window-height
(window-total-size debugger-window))
;; Unshow debugger-buffer.
(quit-restore-window debugger-window debugger-bury-or-kill)
;; Restore current buffer (Bug#12502).
(set-buffer debugger-old-buffer))))
;; Restore previous state of debugger-buffer in case we were
;; in a recursive invocation of the debugger, otherwise just
;; erase the buffer and put it into fundamental mode.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment