(,(car newval) (cons ,g ,getter)))
,setter))))
-(defmacro-mundanely pushnew (obj place &rest keys &environment env)
+(defmacro-mundanely pushnew (obj place &rest keys
+ &key key test test-not &environment env)
#!+sb-doc
"Takes an object and a location holding a list. If the object is
already in the list, does nothing; otherwise, conses the object onto
the list. Returns the modified list. If there is a :TEST keyword, this
is used for the comparison."
+ (declare (ignore key test test-not))
(multiple-value-bind (dummies vals newval setter getter)
(get-setf-method place env)
(let ((g (gensym)))
"Creates a new read-modify-write macro like PUSH or INCF."
(let ((other-args nil)
(rest-arg nil)
- (env (gensym))
- (reference (gensym)))
+ (env (make-symbol "ENV")) ; To beautify resulting arglist.
+ (reference (make-symbol "PLACE"))) ; Note that these will be nonexistent
+ ; in the final expansion anyway.
;; Parse out the variable names and &REST arg from the lambda list.
(do ((ll lambda-list (cdr ll))
(arg nil))
(multiple-value-bind (body local-decs doc)
(parse-defmacro `(,lambda-list ,@store-variables)
whole-var body access-fn 'defsetf
+ :environment env-var
:anonymousp t)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(assign-setf-macro
',access-fn
(lambda (,access-form-var ,env-var)
- (declare (ignore ,env-var))
+ ,@local-decs
(%defsetf ,access-form-var ,(length store-variables)
(lambda (,whole-var)
- ,@local-decs
,body)))
nil
',doc))))))