]> code.delx.au - gnu-emacs/commitdiff
Fix delete-dups bug on long lists
authorAri Roponen <ari.roponen@gmail.com>
Thu, 16 Jul 2015 14:52:30 +0000 (07:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Jul 2015 14:52:52 +0000 (07:52 -0700)
* lisp/subr.el (delete-dups):
Don't mistakenly keep some dups when applied to long lists.

lisp/subr.el

index 5bd4bb40a67740e34e96caf0d0d37156c774aba0..e2c1baea442bd06e2ab5cc79cb514ccdd57062f1 100644 (file)
@@ -426,8 +426,8 @@ one is kept."
             (let ((elt (car retail)))
               (if (gethash elt hash)
                   (setcdr tail (cdr retail))
-                (puthash elt t hash)))
-            (setq tail retail)))
+                (puthash elt t hash)
+                (setq tail retail)))))
       (let ((tail list))
         (while tail
           (setcdr tail (delete (car tail) (cdr tail)))