<p>Your code is incorrect. The defmacro is not a toplevel form and thus the definition is not available for the statement that follows it. Use macrolet instead.</p>
<div class="gmail_quote">El 10/12/2012 23:28, "Peter Enerccio" <<a href="mailto:enerccio@gmail.com">enerccio@gmail.com</a>> escribió:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello, I dont know if this is related to the common lisp or the ecl, <br>but imagine code like this, compiled into function:<br><br>(LAMBDA ()<br>  (LET ((CORE::P *PACKAGE*) (CORE:THIS #<a GAME:CUBE>))<br>    (IN-PACKAGE ANCA)<br>

    (HANDLER-CASE<br>     (UNWIND-PROTECT<br>         (PROGN<br>          (PROGN<br>           (DEFMACRO ANCA::RUNNABLE (&BODY ANCA::BODY)<br>             (SI:QUASIQUOTE (LAMBDA () (SI:UNQUOTE-SPLICE ANCA::BODY))))<br>

           ((ANCA::RUNNABLE (PRINT "Ahoj")))))<br>       (SETF *PACKAGE* CORE::P))<br>     (T (CORE::X)<br>      (FUNCALL<br>       #<bytecompiled-closure #<bytecompiled-function 00000000032387d0>><br>

       #<a GAME:CUBE><br>       CORE::X)))<br>    T))<br><br>which will work fine, until it will be run, where it will crash with <br><br>;;; Loading #P"/usr/lib/ecl-12.12.1/cmp.fas"<br>;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0<br>

;;;<br>;;; Error:<br>;;;   * (ANCA::RUNNABLE (PRINT "Ahoj")) is not a legal function name.The variable C::GAZONK is unbound.<br><br>I have no idea what C::GAZONK is, but I imagine that it is not recognizing macro made with the defmacro before?<br>

<br>The problem is, that I need to save this into lambda so it is evaluated later, not right now (and definitely not in this thread).<br clear="all"><br>-- <br>Bc. Peter Vaňušanik<br><a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br>

<br>
<br>------------------------------------------------------------------------------<br>
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial<br>
Remotely access PCs and mobile devices and provide instant support<br>
Improve your efficiency, and focus on delivering more value-add services<br>
Discover what IT Professionals Know. Rescue delivers<br>
<a href="http://p.sf.net/sfu/logmein_12329d2d" target="_blank">http://p.sf.net/sfu/logmein_12329d2d</a><br>_______________________________________________<br>
Ecls-list mailing list<br>
<a href="mailto:Ecls-list@lists.sourceforge.net">Ecls-list@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
<br></blockquote></div>