Commit 5a973d51 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* diff.el (diff): Fix it for good, hopefully, this time.

parent 12365240
......@@ -84,14 +84,13 @@ When called interactively with a prefix argument, prompt
interactively for diff switches. Otherwise, the switches
specified in `diff-switches' are passed to the diff command."
(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))
(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))
(concat "Diff original file (default "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment