From f3af92b794bcce576fb0acad47b41f677a2b41dc Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 29 Nov 2011 15:59:24 +0100 Subject: * vc/diff-mode.el (diff-find-file-name): Make `read-file-name' aware of remote file names. (Bug#10124) --- lisp/vc/diff-mode.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lisp/vc/diff-mode.el') diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index dd919ea7ebf..8f4b59f9e53 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -815,9 +815,11 @@ PREFIX is only used internally: don't use it." (diff-find-file-name old noprompt (match-string 1))) ;; if all else fails, ask the user (unless noprompt - (let ((file (read-file-name (format "Use file %s: " - (or (first fs) "")) - nil (first fs) t (first fs)))) + (let ((file (expand-file-name (or (first fs) "")))) + (setq file + (read-file-name (format "Use file %s: " file) + (file-name-directory file) file t + (file-name-nondirectory file))) (set (make-local-variable 'diff-remembered-files-alist) (cons (cons fs file) diff-remembered-files-alist)) file)))))) -- cgit v1.2.1