[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does defmacro need a lexicality barrier?

    The definition of DEFMACRO clearly says that the body of the macro
is in the null environment.  Although "it is an error" to refer to an
unbound variable, you do have to make the environment null because
information related to a lexical binding around the defmacro would
erroneously be attached any free variable with the same name in the

    In Spice Lisp, we have an internal special form
IN-GLOBAL-ENVIRONMENT which is used for this exact purpose.