diff options
author | Kim F. Storm <storm@cua.dk> | 2006-09-20 23:12:15 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-09-20 23:12:15 +0000 |
commit | 5bde639f478b246e33bfb74f03e8f8ccfa7542f9 (patch) | |
tree | cd35c7180a5f1b2b94be4df72be20ff288f24a53 /lisp/emacs-lisp | |
parent | 008ef0efaab24b4d02cb2dfeb82cd050e08a21f3 (diff) | |
download | emacs-5bde639f478b246e33bfb74f03e8f8ccfa7542f9.tar.gz |
(pushnew): Rework 2006-09-10 change. Use memql
instead of add-to-list in the simple case.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl.el | 4 |
1 files changed, 1 insertions, 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))) |