From: jsancho Date: Tue, 28 Dec 2010 20:23:00 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=3823778d4ca2d265906312521f63da265a4d2630;p=gacela.git --- diff --git a/gacela_objects.lisp b/gacela_objects.lisp index 602318d..7ab8eb7 100755 --- a/gacela_objects.lisp +++ b/gacela_objects.lisp @@ -74,12 +74,18 @@ active-objects)) -(defun make-object (&key name class attr bhv look) +(defun make-object-old (name &key attr bhv look) (let ((object - `(:name ,name :class ,class :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look ,look))) + `(:name ,name :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look ,look))) (add-object object) object)) +(defmacro make-object (name attr bhv &body look) + `(let ((object + '(:name ,name :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look (lambda () ,@look)))) + (add-object object) + object)) + (defun make-object-attributes (attr) (cond ((or (null attr) (atom attr)) nil) (t (let ((rest (make-object-attributes (cdr attr)))