emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/gud.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/gud.el,v
Date: Wed, 11 Jul 2007 19:38:22 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       07/07/11 19:38:21

Index: progmodes/gud.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/gud.el,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -b -r1.132 -r1.133
--- progmodes/gud.el    10 Jul 2007 02:02:35 -0000      1.132
+++ progmodes/gud.el    11 Jul 2007 19:38:21 -0000      1.133
@@ -292,6 +292,11 @@
 (defun gud-file-name (f)
   "Transform a relative file name to an absolute file name.
 Uses `gud-<MINOR-MODE>-directories' to find the source files."
+  ;; When `default-directory' is a remote file name, prepend its
+  ;; remote part to f, which is the local file name.  Fortunately,
+  ;; `file-remote-p' returns exactly this remote file name part (or
+  ;; nil otherwise).
+  (setq f (concat (or (file-remote-p default-directory) "") f))
   (if (file-exists-p f) (expand-file-name f)
     (let ((directories (gud-val 'directories))
          (result nil))
@@ -2510,7 +2515,10 @@
       (while (and w (not (eq (car w) t)))
        (setq w (cdr w)))
       (if w
-         (setcar w file)))
+         (setcar w
+                 (if (file-remote-p default-directory)
+                     (setq file (file-name-nondirectory file))
+                   file))))
     (apply 'make-comint (concat "gud" filepart) program nil
           (if massage-args (funcall massage-args file args) args))
     ;; Since comint clobbered the mode, we don't set it until now.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]