<br><br><div class="gmail_quote">On Thu, Feb 11, 2010 at 11:42 AM, Marko Kocić <span dir="ltr"><<a href="mailto:marko.kocic@gmail.com">marko.kocic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Actually what I was complaining is that when you load fas file<br>
symbol-macro is unbound.  Loading lisp file is ok. It deosn't have to<br>
do with the load-time-values like in hunchentoot examble.<br>
<br>
markko@mst:~$ cat bug.lisp<br>
(define-symbol-macro m "tstst")<br>
(defvar a m)<br></blockquote><div><br></div><div>The error is very subtle. You have to go here</div><div>   <a href="http://www.lispworks.com/documentation/HyperSpec/Body/03_bcaa.htm">http://www.lispworks.com/documentation/HyperSpec/Body/03_bcaa.htm</a></div>
<div><br></div><div>define-symbol-macro does not have compile-time side effects. That means that when the compiler reaches the form (defvar a m) it does not know that M is a macro! This causes a load time error because the code is designed to find out the value of the variable "M", not to use "tstst".</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
markko@mst:~$ ecl -norc -compile bug.lisp<br>
;;; Loading #P"/home/markko/lib/ecl-10.2.1/cmp.fas"<br>
;;; Loading #P"/home/markko/lib/ecl-10.2.1/sysfun.lsp"<br>
;;; Compiling bug.lisp.<br>
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0<br>
;;; Compiling (DEFVAR A ...).<br>
;;; Variable M was undefined. Compiler assumes it is a global.</blockquote><div><br></div><div>See what I mean? The compiler does not interpret M as a symbol macro.</div><div><br></div><div>The code above is non-conformant.</div>
<div><br></div><div>Juanjo </div></div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>