(if answer
(display-buffer buf nil (or frame 0)) ;Deiconify the frame if necessary.
(let ((window (get-lru-window)))
- (let* ((largest (get-largest-window))
- (cur-size (window-height largest)))
- (setq answer (split-window largest))
- (set-window-buffer answer buf)
- (set-window-dedicated-p answer dedicated)))
- answer)))
+ (if (memq (buffer-local-value 'gud-minor-mode (window-buffer window))
+ '(gdba gdbmi))
+ (let* ((largest (get-largest-window))
+ (cur-size (window-height largest)))
+ (setq answer (split-window largest))
+ (set-window-buffer answer buf)
+ (set-window-dedicated-p answer dedicated)
+ answer)
+ (set-window-buffer window buf)
+ window)))))
\f
;;; Shared keymap initialization: