Emacs: Fix IO buffer in GDB

master
Pierre Neidhardt 2017-05-06 01:08:06 +05:30
parent 3d41480297
commit 531f52fd69
1 changed files with 10 additions and 16 deletions

View File

@ -1,12 +1,12 @@
;; GUD
;; Set GUD to display many windows by default.
;; (setq gdb-show-main t)
(setq gdb-many-windows t)
;; Change GUD many-windows layout.
(defun gdb-setup-windows ()
"Layout the window pattern for `gdb-many-windows'."
"Layout the window pattern for `gdb-many-windows'.
Do not set `gdb-show-main' to true as we handle it manually here."
(setq gdb-source-window (selected-window))
(gdb-display-locals-buffer)
(delete-other-windows)
@ -15,11 +15,6 @@
(gdb-display-breakpoints-buffer)
(delete-other-windows)
;; TODO: this does not behave the same on Emacs 23 and 24.
;; This may be needed for gud/pdb.
;; (defadvice pop-to-buffer (before cancel-other-window first)
;; (ad-set-arg 1 nil))
;; (ad-activate 'pop-to-buffer)
(switch-to-buffer
(if gud-last-last-frame
(gud-find-file (car gud-last-last-frame))
@ -30,18 +25,17 @@
(split-window-horizontally)
(other-window 1)
(split-window nil ( / ( * (window-height) 3) 4))
(split-window nil ( / (window-height) 3))
(split-window nil (/ ( * (window-height) 3) 4))
(split-window nil (/ (window-height) 3))
(gdb-set-window-buffer (gdb-locals-buffer-name))
(split-window-horizontally)
(other-window 1)
(gdb-set-window-buffer
(gdb-get-buffer-create 'gdb-inferior-io)))
(other-window 1)
(gdb-set-window-buffer gud-comint-buffer)
(when (and
(boundp 'gdb-use-separate-io-buffer)
gdb-use-separate-io-buffer)
(split-window-horizontally)
(other-window 1)
(gdb-set-window-buffer
(gdb-get-buffer-create 'gdb-inferior-io)))
(other-window 1)
(gdb-set-window-buffer (gdb-stack-buffer-name))
(split-window-horizontally)