comparison lisp/progmodes/gud.el @ 78931:4c662e5e1263

(gud-display-line): Find source buffer even when GUD buffer has it's own frame.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 01 Oct 2007 11:28:21 +0000
parents d8140314e60f
children 07537c759a20
comparison
equal deleted inserted replaced
78930:6bf33e79e3cf 78931:4c662e5e1263
2628 (let* ((obuf (current-buffer))) 2628 (let* ((obuf (current-buffer)))
2629 ;; save-excursion isn't the right thing if 2629 ;; save-excursion isn't the right thing if
2630 ;; process-buffer is current-buffer 2630 ;; process-buffer is current-buffer
2631 (unwind-protect 2631 (unwind-protect
2632 (progn 2632 (progn
2633 ;; Write something in *compilation* and hack its mode line, 2633 ;; Write something in the GUD buffer and hack its mode line,
2634 (set-buffer (process-buffer proc)) 2634 (set-buffer (process-buffer proc))
2635 ;; Fix the mode line. 2635 ;; Fix the mode line.
2636 (setq mode-line-process 2636 (setq mode-line-process
2637 (concat ":" 2637 (concat ":"
2638 (symbol-name (process-status proc)))) 2638 (symbol-name (process-status proc))))
2684 (defun gud-display-line (true-file line) 2684 (defun gud-display-line (true-file line)
2685 (let* ((last-nonmenu-event t) ; Prevent use of dialog box for questions. 2685 (let* ((last-nonmenu-event t) ; Prevent use of dialog box for questions.
2686 (buffer 2686 (buffer
2687 (with-current-buffer gud-comint-buffer 2687 (with-current-buffer gud-comint-buffer
2688 (gud-find-file true-file))) 2688 (gud-find-file true-file)))
2689 (window (and buffer (or (get-buffer-window buffer) 2689 (window (and buffer
2690 (if (memq gud-minor-mode '(gdbmi gdba)) 2690 (or (get-buffer-window buffer)
2691 (unless (gdb-display-source-buffer buffer) 2691 (if (memq gud-minor-mode '(gdbmi gdba))
2692 (gdb-display-buffer buffer nil))) 2692 (or (if (get-buffer-window buffer 0)
2693 (display-buffer buffer)))) 2693 (display-buffer buffer nil 0))
2694 (unless (gdb-display-source-buffer buffer)
2695 (gdb-display-buffer buffer nil))))
2696 (display-buffer buffer))))
2694 (pos)) 2697 (pos))
2695 (if buffer 2698 (if buffer
2696 (progn 2699 (progn
2697 (with-current-buffer buffer 2700 (with-current-buffer buffer
2698 (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) 2701 (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer)