aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2011-07-12 09:26:48 +0200
committerLars Magne Ingebrigtsen2011-07-12 09:26:48 +0200
commit296ba3ee9f7f8d1b9ba0c8dbf0cd8127fd02e9f0 (patch)
treeb0ccdefc46ce63d7b2eb6177d53b62a85bed158e
parent71e0ea1358607ad22ee8759345fd023553331f44 (diff)
downloademacs-296ba3ee9f7f8d1b9ba0c8dbf0cd8127fd02e9f0.tar.gz
emacs-296ba3ee9f7f8d1b9ba0c8dbf0cd8127fd02e9f0.zip
Remove `remove-duplicates', since `delete-dups' is sufficient.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/dired-x.el2
-rw-r--r--lisp/subr.el11
3 files changed, 8 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c3b33866657..dfea2f43e54 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient.
4
5 * dired-x.el (dired-guess-default): Use `delete-dups'.
6
12011-07-12 Chong Yidong <cyd@stupidchicken.com> 72011-07-12 Chong Yidong <cyd@stupidchicken.com>
2 8
3 * dired.el (dired-mark-prompt): 9 * dired.el (dired-mark-prompt):
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index a341e4f07a1..0f2cfd4973f 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1103,7 +1103,7 @@ See `dired-guess-shell-alist-user'."
1103 ;; Return commands or nil if flist is still non-nil. 1103 ;; Return commands or nil if flist is still non-nil.
1104 ;; Evaluate the commands in order that any logical testing will be done. 1104 ;; Evaluate the commands in order that any logical testing will be done.
1105 (if (cdr cmds) 1105 (if (cdr cmds)
1106 (remove-duplicates (mapcar #'eval cmds)) 1106 (delete-dups (mapcar #'eval cmds))
1107 (eval (car cmds))))) ; single command 1107 (eval (car cmds))))) ; single command
1108 1108
1109(defun dired-guess-shell-command (prompt files) 1109(defun dired-guess-shell-command (prompt files)
diff --git a/lisp/subr.el b/lisp/subr.el
index 2b7ba17e10c..5c9d6c8d724 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -173,7 +173,7 @@ value of last one, or nil if there are none.
173 (progn 173 (progn
174 ;; If we reload subr.el after having loaded CL, be careful not to 174 ;; If we reload subr.el after having loaded CL, be careful not to
175 ;; overwrite CL's extended definition of `dolist', `dotimes', 175 ;; overwrite CL's extended definition of `dolist', `dotimes',
176 ;; `declare', `push', `pop' and `remove-duplicates'. 176 ;; `declare', `push' and `pop'.
177 177
178(defmacro dolist (spec &rest body) 178(defmacro dolist (spec &rest body)
179 "Loop over a list. 179 "Loop over a list.
@@ -250,15 +250,6 @@ the return value (nil if RESULT is omitted).
250Treated as a declaration when used at the right place in a 250Treated as a declaration when used at the right place in a
251`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)" 251`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)"
252 nil) 252 nil)
253
254(defun remove-duplicates (list)
255 "Return a copy of LIST with all duplicate elements removed."
256 (let ((result nil))
257 (while list
258 (unless (member (car list) result)
259 (push (car list) result))
260 (pop list))
261 (nreverse result)))
262)) 253))
263 254
264(defmacro ignore-errors (&rest body) 255(defmacro ignore-errors (&rest body)