Mercurial > emacs
changeset 111714:157b25217077
* diff.el (diff): Fix it for good, hopefully, this time.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 25 Nov 2010 16:59:30 -0500 |
parents | 812a929d6b55 |
children | d00ba7ce3ef0 |
files | lisp/vc/diff.el |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vc/diff.el Thu Nov 25 22:28:14 2010 +0200 +++ b/lisp/vc/diff.el Thu Nov 25 16:59:30 2010 -0500 @@ -84,14 +84,13 @@ interactively for diff switches. Otherwise, the switches specified in `diff-switches' are passed to the diff command." (interactive - (let* ((newf (buffer-file-name)) - (oldf (file-newest-backup newf))) - (setq newf (if (and newf (file-exists-p newf)) + (let* ((newf (if (and buffer-file-name (file-exists-p buffer-file-name)) (read-file-name (concat "Diff new file (default " - (file-name-nondirectory newf) "): ") - nil newf t) + (file-name-nondirectory buffer-file-name) "): ") + nil buffer-file-name t) (read-file-name "Diff new file: " nil nil t))) + (oldf (file-newest-backup newf))) (setq oldf (if (and oldf (file-exists-p oldf)) (read-file-name (concat "Diff original file (default "