]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove `remove-duplicates', since `delete-dups' is sufficient.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 12 Jul 2011 07:26:48 +0000 (09:26 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 12 Jul 2011 07:26:48 +0000 (09:26 +0200)
lisp/ChangeLog
lisp/dired-x.el
lisp/subr.el

index c3b33866657047ef5ac64a2af8a7c3958779e331..dfea2f43e54c2b552ed8114d804d87ba7668660d 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient.
+
+       * dired-x.el (dired-guess-default): Use `delete-dups'.
+
 2011-07-12  Chong Yidong  <cyd@stupidchicken.com>
 
        * dired.el (dired-mark-prompt):
index a341e4f07a17f4021d545845950448b3ced9b051..0f2cfd4973fb2c99e30b809bed0028ccaed93e08 100644 (file)
@@ -1103,7 +1103,7 @@ See `dired-guess-shell-alist-user'."
     ;; Return commands or nil if flist is still non-nil.
     ;; Evaluate the commands in order that any logical testing will be done.
     (if (cdr cmds)
-       (remove-duplicates (mapcar #'eval cmds))
+       (delete-dups (mapcar #'eval cmds))
       (eval (car cmds)))))             ; single command
 
 (defun dired-guess-shell-command (prompt files)
index 2b7ba17e10c5b7f14c16b56d98c00f0bf1197b3c..5c9d6c8d7249e0f5f88908e4d6c76a73bc29bb6e 100644 (file)
@@ -173,7 +173,7 @@ value of last one, or nil if there are none.
     (progn
   ;; If we reload subr.el after having loaded CL, be careful not to
   ;; overwrite CL's extended definition of `dolist', `dotimes',
-  ;; `declare', `push', `pop' and `remove-duplicates'.
+  ;; `declare', `push' and `pop'.
 
 (defmacro dolist (spec &rest body)
   "Loop over a list.
@@ -250,15 +250,6 @@ the return value (nil if RESULT is omitted).
 Treated as a declaration when used at the right place in a
 `defmacro' form.  \(See Info anchor `(elisp)Definition of declare'.)"
   nil)
-
-(defun remove-duplicates (list)
-  "Return a copy of LIST with all duplicate elements removed."
-  (let ((result nil))
-    (while list
-      (unless (member (car list) result)
-       (push (car list) result))
-      (pop list))
-    (nreverse result)))
 ))
 
 (defmacro ignore-errors (&rest body)