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

Re: issue MACRO-ENVIRONMENT-CREATOR, version 1



Sigh, I'd overlooked that.  I guess I'll have to think about this
issue some more.

Actually it is not strictly necessary for a code walker do anything
special for local function definitions, but once again this involves a
non-obvious "trick".  As I've mentioned elsewhere, A-Lisp internally
does a source-to-source transformation to turn FLET and LABELS into
LETs and MACROLETs.  For example, it turns

    (flet ((foo (x) ...))
        ...)

into something like

    (let ((temp  #'(lambda (x) ...)))
        (macrolet ((foo (&rest args)  `(funcall temp ,@args)))
            ....))

where "temp" is really a gensym.  It takes a little extra work to make
FUNCTION work right.

-Sandra
-------