diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2011-11-29 15:59:24 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2011-11-29 15:59:24 +0100 |
commit | f3af92b794bcce576fb0acad47b41f677a2b41dc (patch) | |
tree | 24c585b203ca99b6cff0c11d8355a5f970fe062e /lisp | |
parent | ed472be992d255fc4db5f612ecc9b3e6e094bee1 (diff) | |
download | emacs-f3af92b794bcce576fb0acad47b41f677a2b41dc.tar.gz emacs-f3af92b794bcce576fb0acad47b41f677a2b41dc.tar.bz2 emacs-f3af92b794bcce576fb0acad47b41f677a2b41dc.zip |
* vc/diff-mode.el (diff-find-file-name): Make `read-file-name'
aware of remote file names. (Bug#10124)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/vc/diff-mode.el | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57fbbf8b825..37c7271b2f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-29 Michael Albinus <michael.albinus@gmx.de> + + * vc/diff-mode.el (diff-find-file-name): Make `read-file-name' + aware of remote file names. (Bug#10124) + 2011-11-29 Chong Yidong <cyd@gnu.org> * frame.el (auto-raise-mode, auto-lower-mode): Doc fix. 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)))))) |