aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-03-24 19:48:09 +0000
committerJuri Linkov2005-03-24 19:48:09 +0000
commit3659a2b894dd0d7b5bd1a455ff365325d2e8b3f1 (patch)
tree809bf1651b63338c7f0a559ecfdb923c2f2e4432
parent0e2aaf98440aceb113625ad313346dd1c273b952 (diff)
downloademacs-3659a2b894dd0d7b5bd1a455ff365325d2e8b3f1.tar.gz
emacs-3659a2b894dd0d7b5bd1a455ff365325d2e8b3f1.zip
(dired-compare-directories): Add autoload cookie.
Doc fix. Replace `read-file-name' with `read-directory-name'.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/dired-aux.el10
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 60ccc271e26..90a9098cb06 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12005-03-24 Juri Linkov <juri@jurta.org>
2
3 * dired.el (dired-mode-map): Add menu item "Compare directories"
4 for dired-compare-directories.
5
6 * dired-aux.el (dired-compare-directories): Add autoload cookie.
7 Doc fix. Replace `read-file-name' with `read-directory-name'.
8
12005-03-24 Stefan <monnier@iro.umontreal.ca> 92005-03-24 Stefan <monnier@iro.umontreal.ca>
2 10
3 * term/xterm.el: If running in Terminal.app set coding-system to utf-8. 11 * term/xterm.el: If running in Terminal.app set coding-system to utf-8.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 2e210d084ba..9a1449823ca 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -91,13 +91,14 @@ With prefix arg, prompt for argument SWITCHES which is options for `diff'."
91 nil)) 91 nil))
92 (diff-backup (dired-get-filename) switches)) 92 (diff-backup (dired-get-filename) switches))
93 93
94;;;###autoload
94(defun dired-compare-directories (dir2 predicate) 95(defun dired-compare-directories (dir2 predicate)
95 "Mark files with different file attributes in two dired buffers. 96 "Mark files with different file attributes in two dired buffers.
96Compare file attributes of files in the current directory 97Compare file attributes of files in the current directory
97with file attributes in directory DIR2 using PREDICATE on pairs of files 98with file attributes in directory DIR2 using PREDICATE on pairs of files
98with the same name. Mark files for which PREDICATE returns non-nil. 99with the same name. Mark files for which PREDICATE returns non-nil.
99Mark files with different names if PREDICATE is nil (or interactively 100Mark files with different names if PREDICATE is nil (or interactively
100when the user enters empty input at the predicate prompt). 101with empty input at the predicate prompt).
101 102
102PREDICATE is a Lisp expression that can refer to the following variables: 103PREDICATE is a Lisp expression that can refer to the following variables:
103 104
@@ -117,9 +118,10 @@ Examples of PREDICATE:
117 (not (and (= (nth 2 fa1) (nth 2 fa2)) - mark files with different UID 118 (not (and (= (nth 2 fa1) (nth 2 fa2)) - mark files with different UID
118 (= (nth 3 fa1) (nth 3 fa2)))) and GID." 119 (= (nth 3 fa1) (nth 3 fa2)))) and GID."
119 (interactive 120 (interactive
120 (list (read-file-name (format "Compare %s with: " 121 (list (read-directory-name (format "Compare %s with: "
121 (dired-current-directory)) 122 (dired-current-directory))
122 (dired-dwim-target-directory)) 123 (dired-dwim-target-directory)
124 (dired-dwim-target-directory))
123 (read-from-minibuffer "Mark if (lisp expr or RET): " nil nil t nil "nil"))) 125 (read-from-minibuffer "Mark if (lisp expr or RET): " nil nil t nil "nil")))
124 (let* ((dir1 (dired-current-directory)) 126 (let* ((dir1 (dired-current-directory))
125 (file-alist1 (dired-files-attributes dir1)) 127 (file-alist1 (dired-files-attributes dir1))