aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAri Roponen2015-07-16 07:52:30 -0700
committerPaul Eggert2015-07-16 07:52:52 -0700
commit572cd26f3f03995dbb3689b8a6f0a575ec9b9cb6 (patch)
tree904d2a5171cc7d475e344b7de435b3dacd402740
parenta5522abbca2235771384949dfa87c8efc68831b2 (diff)
downloademacs-572cd26f3f03995dbb3689b8a6f0a575ec9b9cb6.tar.gz
emacs-572cd26f3f03995dbb3689b8a6f0a575ec9b9cb6.zip
Fix delete-dups bug on long lists
* lisp/subr.el (delete-dups): Don't mistakenly keep some dups when applied to long lists.
-rw-r--r--lisp/subr.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 5bd4bb40a67..e2c1baea442 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -426,8 +426,8 @@ one is kept."
426 (let ((elt (car retail))) 426 (let ((elt (car retail)))
427 (if (gethash elt hash) 427 (if (gethash elt hash)
428 (setcdr tail (cdr retail)) 428 (setcdr tail (cdr retail))
429 (puthash elt t hash))) 429 (puthash elt t hash)
430 (setq tail retail))) 430 (setq tail retail)))))
431 (let ((tail list)) 431 (let ((tail list))
432 (while tail 432 (while tail
433 (setcdr tail (delete (car tail) (cdr tail))) 433 (setcdr tail (delete (car tail) (cdr tail)))