[erlisp-devel] undefined-symbol

Willem Broekema metawilm at gmail.com
Fri Sep 2 13:27:28 UTC 2005


On 9/2/05, Eric Lavigne <lavigne.eric at gmail.com> wrote:
> I am confused by this error message.
> 
> ;
> ; File: /root/erlisp/erlisp-cmucl/erlisp/src/manager.lisp
> 
> ; In: DEFUN SYSTEM-MANAGER-PROCESS
> 
> ;   (RECEIVE-WITH-MATCHER (COND-MATCHER M) (T M))
> ; Error: (during macroexpansion)
> ; Error in KERNEL::UNDEFINED-SYMBOL-ERROR-HANDLER:  the function
> LISTEN-TO-SYSTEM-MANAGER is undefined.

In the files you attached there was no call to this function, and as I
have not checked out the source I can't be sure, but apparently some
macro calls LISTEN-TO-SYSTEM-MANAGER during its expansion.

Now normally macroexpansion happens before functions are loaded.
Therefore a macro should normally expand without calling functions
(but may of course include function calls in the generated expansion
code).

When you really want to have a function to be available at
macro-expansion time, you have to wrap the function in eval-when, like
what now happens already with many functions in messaging.lisp:

(eval-when (:compile-toplevel :load-toplevel :execute)
 (defun LISTEN-... (..)  ..)
)


- Willem



More information about the Erlisp-devel mailing list