Fix delete-dups bug on long lists
* lisp/subr.el (delete-dups): Don't mistakenly keep some dups when applied to long lists.
This commit is contained in:
parent
a5522abbca
commit
572cd26f3f
1 changed files with 2 additions and 2 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue