Mercurial > emacs
changeset 94476:3fd45a6262cb
(gdb-display-buffer): Don't pop up GUD buffer.
Always split windows.
(gdb-speedbar-timer-fn): Only raise frame after user input.
(gdb-same-frame): Reverse initial value.
(gdb-display-gdb-buffer): Check for GUD buffer in other frames.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Tue, 29 Apr 2008 11:02:22 +0000 |
parents | cbe85fa81a06 |
children | c5e171cb3acf |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 10 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Tue Apr 29 11:00:31 2008 +0000 +++ b/lisp/progmodes/gdb-ui.el Tue Apr 29 11:02:22 2008 +0000 @@ -814,6 +814,8 @@ (push 'gdb-speedbar-timer gdb-pending-triggers))) (defun gdb-speedbar-timer-fn () + (if gdb-speedbar-auto-raise + (raise-frame speedbar-frame)) (setq gdb-pending-triggers (delq 'gdb-speedbar-timer gdb-pending-triggers)) (speedbar-timer-fn)) @@ -1472,7 +1474,7 @@ (gdb-resync) (error "Unexpected frame-begin annotation (%S)" sink))))) -(defcustom gdb-same-frame focus-follows-mouse +(defcustom gdb-same-frame (not focus-follows-mouse) "Non-nil means pop up GUD buffer in same frame." :group 'gdb :type 'boolean @@ -3056,28 +3058,15 @@ ;;;; Window management (defun gdb-display-buffer (buf dedicated &optional frame) - (let ((answer (get-buffer-window buf (or frame 0))) - (must-split nil)) + (let ((answer (get-buffer-window buf (or frame 0)))) (if answer (display-buffer buf nil (or frame 0)) ;Deiconify the frame if necessary. - (if (get-buffer-window gud-comint-buffer) - (select-window (get-buffer-window gud-comint-buffer)) - ;; If the buffer is not yet displayed, select the right frame. - (pop-to-buffer gud-comint-buffer)) (let ((window (get-lru-window))) - (if (and window - (not (memq window `(,(get-buffer-window gud-comint-buffer) - ,gdb-source-window)))) - (progn - (set-window-buffer window buf) - (setq answer window)) - (setq must-split t))) - (if must-split - (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))) + (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))) @@ -3159,7 +3148,7 @@ "Display GUD buffer." (interactive) (let ((same-window-regexps nil)) - (pop-to-buffer gud-comint-buffer))) + (select-window (display-buffer gud-comint-buffer nil 0)))) (defun gdb-set-window-buffer (name) (set-window-buffer (selected-window) (get-buffer name))