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

applyhook



Rob,

I don't think the example you give has anything to do with *APPLYHOOK*.
*APPLYHOOK* is supposed to intercept the implicit calls to apply that
occur within EVAL.  It is not supposed to handle explicit calls done by
APPLY, FUNCALL, MAP, etc.  See page 322.  The name "applyhook" is a bit
confusing because of this, but I can't think of any better name.

I believe that the final decision on forms like

(apply '(lambda (x) ... code ...) ...)

was that they were allowed, but that the lambda was executed in the NULL
lexical environment.  As you say, if it has to use the current lexical
environment there's no way to compile it in the general case where the
lambda-form may be generated at runtime.  However, I can't find any
discussion of this in the manual and may be misremembering the decision.
I do remember that discussions of this dragged on for quite awhile.

-- Scott