From: jsancho Date: Thu, 2 Jun 2011 21:50:44 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=d4f71df6d370e9a1178c272d14b35c4a0b86bd2c;p=gacela.git --- diff --git a/src/gacela_mobs.scm b/src/gacela_mobs.scm index de527bd..c442bf5 100755 --- a/src/gacela_mobs.scm +++ b/src/gacela_mobs.scm @@ -19,19 +19,17 @@ ;;; Actions for mobs -(define-macro (define-action name attr . code) +(define-macro (define-action action-def . code) + `(define (,name mob-attr) + ,@code)) + +(define-macro (define-action2 name attr . code) `(define (,name mob-attr) (let ,attr ,@code ,(cons 'begin (map #'attribute-save (reverse attr))) mob-attr))) -(defun attribute-save (attribute) - (let* ((name (cond ((listp attribute) (car attribute)) - (t attribute))) - (pname (attribute-name name))) - `(setf (getf object-attr ,pname) ,name))) - ;;; Mob Factory