On Thu, Feb 11, 2010 at 11:42 AM, Marko Kocić <email@example.com>
Actually what I was complaining is that when you load fas file
symbol-macro is unbound. Loading lisp file is ok. It deosn't have to
do with the load-time-values like in hunchentoot examble.
markko@mst:~$ cat bug.lisp
(define-symbol-macro m "tstst")
(defvar a m)
The error is very subtle. You have to go here
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".
markko@mst:~$ ecl -norc -compile bug.lisp
;;; Loading #P"/home/markko/lib/ecl-10.2.1/cmp.fas"
;;; Loading #P"/home/markko/lib/ecl-10.2.1/sysfun.lsp"
;;; Compiling bug.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;; Compiling (DEFVAR A ...).
;;; Variable M was undefined. Compiler assumes it is a global.
See what I mean? The compiler does not interpret M as a symbol macro.
The code above is non-conformant.