# HG changeset patch # User Kim F. Storm # Date 1158793935 0 # Node ID fc21b1eb42716c2ac558de08133b38cad6107995 # Parent 8a6d7bd59539a6aee534134f3b5d1cb13e1764d1 (pushnew): Rework 2006-09-10 change. Use memql instead of add-to-list in the simple case. diff -r 8a6d7bd59539 -r fc21b1eb4271 lisp/emacs-lisp/cl.el --- 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)))