]> code.delx.au - gnu-emacs/blobdiff - lisp/gud.el
(ps-print-preprint): Special handling if
[gnu-emacs] / lisp / gud.el
index 124a41bee82a727618a6ff8a36cd57a5f3277958..b42d9a200119cf568b0434dc93e207529bc9ef3a 100644 (file)
@@ -1055,8 +1055,9 @@ and source-file directory for your debugger."
   "Major mode for interacting with an inferior debugger process.
 
    You start it up with one of the commands M-x gdb, M-x sdb, M-x dbx,
-or M-x xdb.  Each entry point finishes by executing a hook; `gdb-mode-hook',
-`sdb-mode-hook', `dbx-mode-hook' or `xdb-mode-hook' respectively.
+M-x perldb, or M-x xdb.  Each entry point finishes by executing a
+hook; `gdb-mode-hook', `sdb-mode-hook', `dbx-mode-hook',
+`perldb-mode-hook', or `xdb-mode-hook' respectively.
 
 After startup, the following commands are available in both the GUD
 interaction buffer and any source buffer GUD visits due to a breakpoint stop
@@ -1317,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))