From: Ken Harris Date: Fri, 14 Jun 2013 19:25:21 +0000 (-0700) Subject: Return the reader-form from SETF expansion. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=fc3af0e1e7a268b8aa0320fc84058b5331e0ba85;p=jscl.git Return the reader-form from SETF expansion. --- diff --git a/src/boot.lisp b/src/boot.lisp index d7141f6..f5fd74e 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -472,14 +472,15 @@ ((null (cddr pairs)) (let ((place (!macroexpand-1 (first pairs))) (value (second pairs))) - (multiple-value-bind (vars vals store-vars writer-form) + (multiple-value-bind (vars vals store-vars writer-form reader-form) (get-setf-expansion place) ;; TODO: Optimize the expansion a little bit to avoid let* ;; or multiple-value-bind when unnecesary. `(let* ,(mapcar #'list vars vals) (multiple-value-bind ,store-vars ,value - ,writer-form))))) + ,writer-form + ,reader-form))))) (t `(progn ,@(do ((pairs pairs (cddr pairs)) diff --git a/src/list.lisp b/src/list.lisp index c0370b7..d39a6e6 100644 --- a/src/list.lisp +++ b/src/list.lisp @@ -259,7 +259,7 @@ (list x) (list new-value) `(progn (rplacd ,cons ,new-value) ,new-value) - `(car ,cons)))) + `(cdr ,cons)))) ;; The NCONC function is based on the SBCL's one.