I defined a macro (WHILE) before using it in the same file, but
ACL didn't seem to register its existence during compilation:
;;; Compiling file /usr/home/dan/progg/lib/cl/standard.lisp
Error: attempt to call `WHILE' which is an undefined function.
[condition type: UNDEFINED-FUNCTION]
I just loaded the code into sbcl, and it runs fine. The source file
(uploaded immediately after the error occured) is here:
http://www.prairienet.org/~dsb/mycode/cl/lib/standard.lisp
and the following *may* be all the relevant code, except acl didn't
say what line it errored on. According to emacs (Ctrl-x < Ctrl-s),
the first occurance of WHILE is in the MACX form that defines it,
and the first call is in the definition of DEF.
(defmacro x****t (&rest symbols)
`(eval-when (:load-toplevel :execute) (ex****t ',symbols)))
(defmacro macx (macro args &body body)
`(progn
(defmacro ,macro ,args ,@[EMAIL PROTECTED]
)
(x****t ,macro)))
(macx while (test &body body) `(loop (unless ,test (return)) ,@[EMAIL PROTECTED]
))
(macx def (func args &body defn)
(let (preamble (body defn))
(when (listp body)
(when (stringp (car body)) (push (pop body) preamble))
(while (and (listp (car body))
(eq (caar body) 'declare)) (push (pop body) preamble)))
...
--Dan
------------------------------------------------
Dan Bensen http://www.prairienet.org/~dsb/
cl-match: expressive pattern matching in Lisp
http://common-lisp.net/project/cl-match/


|