Mercurial > emacs
diff lisp/emacs-lisp/cl.el @ 73030:fc21b1eb4271
(pushnew): Rework 2006-09-10 change. Use memql
instead of add-to-list in the simple case.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Wed, 20 Sep 2006 23:12:15 +0000 |
parents | e5e7b6d129dd |
children | 79c3587798b4 bb0e318b7c53 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl.el Wed Sep 20 23:07:17 2006 +0000 +++ b/lisp/emacs-lisp/cl.el Wed Sep 20 23:12:15 2006 +0000 @@ -159,9 +159,7 @@ \n(fn X PLACE [KEYWORD VALUE]...)" (if (symbolp place) (if (null keys) - `(let ((pushnew-internal ,place)) - (add-to-list 'pushnew-internal ,x nil 'eql) - (setq ,place pushnew-internal)) + `(if (memql ,x ,place) ,place (setq ,place (cons ,x ,place))) (list 'setq place (list* 'adjoin x place keys))) (list* 'callf2 'adjoin x place keys)))