From: jsancho Date: Sun, 26 Dec 2010 12:20:26 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=9c98c44926dbe855bb09bd76631d07b5f1fc3933;p=gacela.git --- diff --git a/gacela_objects.lisp b/gacela_objects.lisp index 00ade7f..602318d 100755 --- a/gacela_objects.lisp +++ b/gacela_objects.lisp @@ -74,11 +74,11 @@ active-objects)) -(defmacro make-object (&key name class attr bhv look) - `(let ((object - '(:name ,name :class ,class :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look ,look))) - (add-object object) - object)) +(defun make-object (&key name class attr bhv look) + (let ((object + `(:name ,name :class ,class :attr ,(make-object-attributes attr) :bhv ,(make-object-behaviour bhv) :look ,look))) + (add-object object) + object)) (defun make-object-attributes (attr) (cond ((or (null attr) (atom attr)) nil) @@ -95,5 +95,6 @@ `(,pname ,value))) (defun make-object-behaviour (bhv) - (cond ((consp bhv) bhv) - (t (list bhv)))) + (cond ((null bhv) nil) + ((atom bhv) (list bhv)) + (t bhv)))