From 5bde639f478b246e33bfb74f03e8f8ccfa7542f9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 20 Sep 2006 23:12:15 +0000 Subject: [PATCH] (pushnew): Rework 2006-09-10 change. Use memql instead of add-to-list in the simple case. --- lisp/emacs-lisp/cl.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 53bec05ddc3..3399f7e7b20 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -159,9 +159,7 @@ an element already on the list. \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))) -- 2.39.2