File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 308308 collect ` (, (binding-accessor b) *sketch* )
309309 collect (binding-name b)))))
310310
311- (defmacro defsketchx (sketch-name superclasses binding-forms &body body)
312- (make-defsketch sketch-name superclasses binding-forms body))
313-
314311(defmacro defsketch (sketch-name binding-forms &body body)
315- (make-defsketch sketch-name (list ) binding-forms body))
312+ (multiple-value-bind (options binding-forms)
313+ (extract-options binding-forms)
314+ (make-defsketch sketch-name
315+ (getf options :mixins )
316+ binding-forms
317+ body)))
318+
319+ (defun extract-options (binding-forms)
320+ (let (options)
321+ (loop while (and binding-forms (keywordp (caar binding-forms)))
322+ do (progn
323+ (push (cadar binding-forms) options)
324+ (push (caar binding-forms) options)
325+ (pop binding-forms)))
326+ (values options binding-forms)))
316327
317328(defun make-defsketch (sketch-name superclasses binding-forms body)
318329 (let ((bindings (parse-bindings sketch-name binding-forms
You can’t perform that action at this time.
0 commit comments