Hello everyone,
I have written a Lisp program which runs fine under CLisp, but for
various reasons, I would now like to run it using CMUCL. However, it
makes use of the *evalhook* variable, and setting this in CMUCL seems to
have no effect.
Am I right in thinking that CMUCL does not support *evalhook*? If not,
is there some kind of equivalent that I can use? I have searched the
manual and the web for information about *evalhook* in the context of
CMUCL, but with no luck.
Thanks very much for your help, - Paul
>>>>> "pr" == Paul Roberts <·····@stelo.uklinux.net> writes:
pr> I have written a Lisp program which runs fine under CLisp, but
pr> for various reasons, I would now like to run it using CMUCL.
pr> However, it makes use of the *evalhook* variable, and setting
pr> this in CMUCL seems to have no effect.
pr>
pr> Am I right in thinking that CMUCL does not support *evalhook*?
pr> If not, is there some kind of equivalent that I can use?
*EVALHOOK* is not present in the ANSI CL standard, because it's
not much use in an implementation that compiles all forms before
evaluating them (this technique is used at least in SBCL, MCL and
OpenMCL with default settings, and Corman Common Lisp). CMUCL doesn't
implement *EVALHOOK* or *APPLYHOOK*, even if its EVAL is
mostly-interpreted.
Probably the best way of doing something like *EVALHOOK* is to use a
code walker. CMUCL has a code walker in the WALKER package; it isn't
documented, but the archives of this group (and the CMUCL source code)
will provide a few examples of its use.
--
Eric Marsden <URL:http://www.laas.fr/~emarsden/>