Mercurial > emacs
changeset 55328:4440fe0e7dc6
(gud-watch, gdb-display-buffer)
(gdb-display-source-buffer, gdb-put-breakpoint-icon)
(gdb-remove-breakpoint-icons, gdb-assembler-custom):
Look for window over visible frames.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Sun, 02 May 2004 23:04:20 +0000 |
parents | abaeb209c61a |
children | 1cd8cf52347b |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 20 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Sun May 02 23:03:26 2004 +0000 +++ b/lisp/progmodes/gdb-ui.el Sun May 02 23:04:20 2004 +0000 @@ -217,7 +217,7 @@ (gdb-enqueue-input (list (concat "server interpreter mi \"-var-create - * " expr "\"\n") `(lambda () (gdb-var-create-handler ,expr)))))) - (select-window (get-buffer-window gud-comint-buffer))) + (select-window (get-buffer-window gud-comint-buffer 'visible))) (defun gdb-goto-info () (interactive) @@ -1524,7 +1524,7 @@ #'(lambda (win) (if (eq gud-comint-buffer (window-buffer win)) (set-window-dedicated-p win t)))) - (setq answer (get-buffer-window buf)) + (setq answer (get-buffer-window buf 'visible)) (if (not answer) (let ((window (get-lru-window 'visible))) (if window @@ -1548,7 +1548,7 @@ (if (eq gdb-selected-view 'source) (gdb-display-buffer buffer) (gdb-display-buffer (gdb-get-buffer 'gdb-assembler-buffer))) - (get-buffer-window buffer)) + (get-buffer-window buffer 'visible)) ;;; Shared keymap initialization: @@ -1557,11 +1557,11 @@ (define-key gud-menu-map [frames] `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) + (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) + (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) - (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)) - (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) ; (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) ) @@ -1569,11 +1569,11 @@ (define-key gud-menu-map [displays] `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba))) (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) + (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) + (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) - (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)) - (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) ; (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) ) @@ -1805,11 +1805,10 @@ (when (< left-margin-width 2) (save-current-buffer (setq left-margin-width 2) - (if (get-buffer-window (current-buffer)) - (set-window-margins (get-buffer-window - (current-buffer)) - left-margin-width - right-margin-width)))) + (if (get-buffer-window (current-buffer) 'visible) + (set-window-margins + (get-buffer-window (current-buffer) 'visible) + left-margin-width right-margin-width)))) (put-image (if enabled (or breakpoint-enabled-icon @@ -1833,11 +1832,10 @@ (when (< left-margin-width 2) (save-current-buffer (setq left-margin-width 2) - (if (get-buffer-window (current-buffer)) - (set-window-margins (get-buffer-window - (current-buffer)) - left-margin-width - right-margin-width)))) + (if (get-buffer-window (current-buffer) 'visible) + (set-window-margins + (get-buffer-window (current-buffer) 'visible) + left-margin-width right-margin-width)))) (gdb-put-string (if enabled "B" "b") (1+ start))))) (defun gdb-remove-breakpoint-icons (start end &optional remove-margin) @@ -1846,11 +1844,10 @@ (remove-images start end)) (when remove-margin (setq left-margin-width 0) - (if (get-buffer-window (current-buffer)) - (set-window-margins (get-buffer-window - (current-buffer)) - left-margin-width - right-margin-width)))) + (if (get-buffer-window (current-buffer) 'visible) + (set-window-margins + (get-buffer-window (current-buffer) 'visible) + left-margin-width right-margin-width)))) ;; @@ -1901,7 +1898,7 @@ (if (re-search-forward address nil t) (gdb-put-breakpoint-icon (eq flag ?y)))))))) (if (not (equal gdb-current-address "main")) - (set-window-point (get-buffer-window buffer) pos)))) + (set-window-point (get-buffer-window buffer 'visible) pos)))) (defvar gdb-assembler-mode-map (let ((map (make-sparse-keymap)))