[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
eval'd macros
(defun fn () (mac)) ;==> FN
(defmacro mac () `'foo) ;==> MAC
(fn) ;==> ***Error***
You don't say whether the problem you described occurs in the
interpreter or the compiler. Your example certainly is not required to
work when compiled because the macro definition follows the use. In my
opinion, this should work without an error in the interpreter. Hacking
in the interpreter would be fairly awkward if it didn't. However, the
fourth paragraph on page 143 seems to give implementors permission to do
compiler-like macro expansion when a defun is first seen. I wouldn't
want to use such an implementation, but it probably is legal as the
manual currently stands.
-- Scott