changeset 73227:79c3587798b4

(pushnew-internal): Remove defvar. (pushnew): Fix last change.
author Kim F. Storm <storm@cua.dk>
date Tue, 03 Oct 2006 09:19:17 +0000
parents 0139dca4817f
children 636e0875704e
files lisp/emacs-lisp/cl.el
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl.el	Tue Oct 03 09:19:05 2006 +0000
+++ b/lisp/emacs-lisp/cl.el	Tue Oct 03 09:19:17 2006 +0000
@@ -149,8 +149,6 @@
   (if (symbolp place) (list 'setq place (list 'cons x place))
     (list 'callf2 'cons x place)))
 
-(defvar pushnew-internal)
-
 (defmacro pushnew (x place &rest keys)
   "(pushnew X PLACE): insert X at the head of the list if not already there.
 Like (push X PLACE), except that the list is unmodified if X is `eql' to
@@ -159,7 +157,8 @@
 \n(fn X PLACE [KEYWORD VALUE]...)"
   (if (symbolp place)
       (if (null keys)
- 	  `(if (memql ,x ,place) ,place (setq ,place (cons ,x ,place)))
+ 	  `(let ((x ,x))
+	     (if (memql x ,place) ,place (setq ,place (cons x ,place))))
 	(list 'setq place (list* 'adjoin x place keys)))
     (list* 'callf2 'adjoin x place keys)))