From: Richard M. Stallman Date: Thu, 2 May 1996 21:20:55 +0000 (+0000) Subject: (gud-display-line): Switch to gud buffer before calling gud-find-file. X-Git-Tag: emacs-19.34~735 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=36d6372a4040656aabfbde65ecdfab51c475370c;p=emacs.git (gud-display-line): Switch to gud buffer before calling gud-find-file. --- 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))