From: Paul Roberts
Subject: evalhook and cmucl
Date: 
Message-ID: <3e759d53$0$21990$cc9e4d1f@news.dial.pipex.com>
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
From: Eric Marsden
Subject: Re: evalhook and cmucl
Date: 
Message-ID: <wzi65qi1af7.fsf@melbourne.laas.fr>
>>>>> "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/>