diff options
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r-- | lisp/vc/diff-mode.el | 8 |
1 files changed, 5 insertions, 3 deletions
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)))))) |