+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):
(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)
;; 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.