
New patches:

[Created :writable-accessors form that binds using with-accessors instead of let*. Allows object values to be set by setf'ing the newly bound-variable
Russ Tyndall <russ@acceleration.net>**20080125205232] {
hunk ./dev/bind.lisp 319
+
+(defmethod bind-generate-bindings 
+    ((kind (eql :writable-accessors)) variable-form value-form
+     body declarations remaining-bindings)
+  (bind-handle-accessors-with-accessors variable-form value-form
+		     body declarations remaining-bindings))
+
+(defun bind-handle-accessors-with-accessors (variable-form value-form
+			      body declarations remaining-bindings)
+  (let ((vars variable-form))
+    (assert vars)
+    `((with-accessors (
+	     ,@(loop for var in vars collect
+		    (let ((var-var (or (and (consp var) (first var))
+				       var))
+			  (var-accessor (or (and (consp var) (second var))
+					var)))
+		      `(,var-var ,var-accessor))))
+	,value-form
+	,(bind-filter-declarations declarations variable-form)
+	,@(bind-macro-helper 
+	   remaining-bindings declarations body)))))
hunk ./unit-tests/classes.lisp 46
+
+(addtest (test-classes)
+  basic-accessors
+  (ensure-same
+   (bind (((:writable-accessors a c e)
+	   (make-instance 'metabang-bind-class-2 :a 1 :b 2 :c 3 :d 4 :e 5)))
+     (list e c a))
+   '(5 3 1) :test 'equal))
+
+(addtest (test-classes)
+  accessors-new-variable-names
+  (ensure-same
+   (bind ((obj (make-instance 'metabang-bind-class-2 :a 1 :b 2 :c 3 :d 4 :e 5))
+	  ((:writable-accessors (my-a a) (my-c c) (d the-d))
+	   obj))
+     (setf my-a 42)
+     (list d my-c my-a (a obj)))
+   '(4 3 42 42) :test 'equal))
}

Context:

[TAG version-0.6.4
Gary King <gwking@metabang.com>**20080113175015] 
Patch bundle hash:
c98815acf2bab40fbf028ad906710ac6b1e1e87e
