]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (delete-dups): Make it destructive again.
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 6 May 2015 18:27:43 +0000 (19:27 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 6 May 2015 18:27:43 +0000 (19:27 +0100)
lisp/subr.el

index 591980d03fa09ca88bd944e71ade84c1f2719f36..a32fb968365b4c2c2476897b31f7316a3c2d66db 100644 (file)
@@ -424,12 +424,12 @@ one is kept."
           (unless (gethash elt hash)
             (puthash elt elt hash)
             (push elt res)))
-        (nreverse res))
+        (setcdr list (cdr (nreverse res))))
     (let ((tail list))
       (while tail
         (setcdr tail (delete (car tail) (cdr tail)))
-        (setq tail (cdr tail))))
-    list))
+        (setq tail (cdr tail)))))
+  list)
 
 ;; See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00204.html
 (defun delete-consecutive-dups (list &optional circular)