Changeset 902


Ignore:
Timestamp:
Feb 16, 2005, 7:17:38 AM (17 years ago)
Author:
bryan
Message:

spec says that the long form of defsetf encloses the body in a
block named after the access function.

defsetf was doing the wrong thing and putting the block around
the eventual setf-expansion instead of the body that's evaluated
to generate the setf-expansion.

defsetf should also return the name of the access-fn and not
the doc string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/setf.lisp

    r6 r902  
    218218        ',(%car rest)
    219219        ,@(%cdr rest)))
    220     (destructuring-bind (lambda-list (store-var &rest mv-store-vars) &body body) rest
     220    (destructuring-bind (lambda-list (store-var &rest mv-store-vars) &body body)
     221        rest
    221222      (unless (verify-lambda-list lambda-list)
    222223        (signal-program-error $XBadLambdaList lambda-list))
     
    226227          (multiple-value-bind (body decls doc)
    227228                               (parse-body body env t)
     229            (setq body `((block ,access-fn ,@body)))
    228230            (let* ((args (gensym))
    229231                   (dummies (gensym))
     
    232234                   (access-form (gensym))
    233235                   (environment (gensym)))
    234              
    235236              `(eval-when (:compile-toplevel :load-toplevel :execute)
    236237                 (store-setf-method
     
    252253                               (cdr ,access-form)
    253254                               ,newval-vars
    254                                `((lambda ,,lambda-list
    255                                    (block ,',access-fn ,,@body))
     255                               `((lambda ,,lambda-list ,,@body)
    256256                                 ,@,dummies)
    257257                               ,new-access-form))))))
    258                  ,@(if doc (list doc))))))))))
     258                 ,@(if doc (list doc))
     259                 ',access-fn))))))))
    259260 
    260261(defmacro define-modify-macro (name lambda-list function &optional doc-string)
Note: See TracChangeset for help on using the changeset viewer.