From 36d6372a4040656aabfbde65ecdfab51c475370c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 2 May 1996 21:20:55 +0000 Subject: [PATCH] (gud-display-line): Switch to gud buffer before calling gud-find-file. --- lisp/gud.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gud.el b/lisp/gud.el index fac0be43175..b42d9a20011 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -1318,7 +1318,11 @@ Obeying it means displaying in another window the specified file and line." (defun gud-display-line (true-file line) (let* ((last-nonmenu-event t) ; Prevent use of dialog box for questions. - (buffer (gud-find-file true-file)) + (buffer + (save-excursion + (or (eq (current-buffer) gud-comint-buffer) + (set-buffer gud-comint-buffer)) + (gud-find-file true-file))) (window (display-buffer buffer)) (pos)) ;;; (if (equal buffer (current-buffer)) -- 2.39.2