(defun gud-format-command (str arg)
(let ((insource (not (eq (current-buffer) gud-comint-buffer)))
(frame (or gud-last-frame gud-last-last-frame))
+ (buffer-file-name-localized
+ (if (and (buffer-file-name) (file-remote-p (buffer-file-name)))
+ (tramp-file-name-localname (tramp-dissect-file-name
+ (buffer-file-name) t))
+ (buffer-file-name)))
result)
(while (and str
(let ((case-fold-search nil))
(cond
((eq key ?f)
(setq subst (file-name-nondirectory (if insource
- (buffer-file-name)
+ buffer-file-name-localized
(car frame)))))
((eq key ?F)
(setq subst (file-name-base (if insource
- (buffer-file-name)
+ buffer-file-name-localized
(car frame)))))
((eq key ?d)
(setq subst (file-name-directory (if insource
- (buffer-file-name)
+ buffer-file-name-localized
(car frame)))))
((eq key ?l)
(setq subst (int-to-string