Mercurial > emacs
changeset 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 | 8a6d7bd59539 |
children | b944195ced34 |
files | lisp/emacs-lisp/cl.el |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
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)))