[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111899: * lisp/dired-aux.el (dired-d
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111899: * lisp/dired-aux.el (dired-diff): If file at point is a backup file, |
Date: |
Thu, 28 Feb 2013 23:51:11 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111899
fixes bug: http://debbugs.gnu.org/13772
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Thu 2013-02-28 23:51:11 +0200
message:
* lisp/dired-aux.el (dired-diff): If file at point is a backup file,
use its original as the default value, and reverse the order
of arguments to the `diff' call. Doc fix.
modified:
lisp/ChangeLog
lisp/dired-aux.el
lisp/dired.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-02-28 19:33:03 +0000
+++ b/lisp/ChangeLog 2013-02-28 21:51:11 +0000
@@ -1,3 +1,9 @@
+2013-02-28 Juri Linkov <address@hidden>
+
+ * dired-aux.el (dired-diff): If file at point is a backup file,
+ use its original as the default value, and reverse the order
+ of arguments to the `diff' call. Doc fix. (Bug#13772)
+
2013-02-28 Michael Albinus <address@hidden>
* net/tramp-adb.el (tramp-adb-sdk-dir): Remove. Replaced by ...
=== modified file 'lisp/dired-aux.el'
--- a/lisp/dired-aux.el 2013-01-01 09:11:05 +0000
+++ b/lisp/dired-aux.el 2013-02-28 21:51:11 +0000
@@ -55,7 +55,8 @@
(defun dired-diff (file &optional switches)
"Compare file at point with file FILE using `diff'.
If called interactively, prompt for FILE. If the file at point
-has a backup file, use that as the default. If the mark is active
+has a backup file, use that as the default. If the file at point
+is a backup file, use its original. If the mark is active
in Transient Mark mode, use the file at the mark as the default.
\(That's the mark set by \\[set-mark-command], not by Dired's
\\[dired-mark] command.)
@@ -67,8 +68,10 @@
the string of command switches for the third argument of `diff'."
(interactive
(let* ((current (dired-get-filename t))
- ;; Get the latest existing backup file.
- (oldf (diff-latest-backup-file current))
+ ;; Get the latest existing backup file or its original.
+ (oldf (if (backup-file-name-p current)
+ (file-name-sans-versions current)
+ (diff-latest-backup-file current)))
;; Get the file at the mark.
(file-at-mark (if (and transient-mark-mode mark-active)
(save-excursion (goto-char (mark t))
@@ -107,7 +110,10 @@
(equal (expand-file-name current file)
(expand-file-name current))))
(error "Attempt to compare the file to itself"))
- (diff file current switches)))
+ (if (and (backup-file-name-p current)
+ (equal file (file-name-sans-versions current)))
+ (diff current file switches)
+ (diff file current switches))))
;;;###autoload
(defun dired-backup-diff (&optional switches)
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2013-02-13 09:42:31 +0000
+++ b/lisp/dired.el 2013-02-28 21:51:11 +0000
@@ -3864,13 +3864,14 @@
;;;;;; dired-run-shell-command dired-do-shell-command
dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories
dired-backup-diff
-;;;;;; dired-diff) "dired-aux" "dired-aux.el"
"066bb17769887a7fbc0490003f59e4b3")
+;;;;;; dired-diff) "dired-aux" "dired-aux.el"
"d6a694b6d13fa948465fde52a9ffb3ba")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
Compare file at point with file FILE using `diff'.
If called interactively, prompt for FILE. If the file at point
-has a backup file, use that as the default. If the mark is active
+has a backup file, use that as the default. If the file at point
+is a backup file, use its original. If the mark is active
in Transient Mark mode, use the file at the mark as the default.
\(That's the mark set by \\[set-mark-command], not by Dired's
\\[dired-mark] command.)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111899: * lisp/dired-aux.el (dired-diff): If file at point is a backup file,,
Juri Linkov <=