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

rebinding of *evalhook*



A PCLS user has pointed out that it is basically impossible to setq
*evalhook* from the toploop.  The manual (p. 322) clearly states that
"both *evalhook* and *applyhook* are rebound to the value nil around the
invocation of the hook function", so this is how we've implemented eval.

Our toploop uses the ordinary eval function, just like everybody else.
Once you setq *evalhook* from the toploop, therefore, the hook function
gets called every time you type anything in.  What's more, because of
the rebinding, it's impossible to setq *evalhook* back to NIL so that
the hook function doesn't get called anymore.

Do other implementations do anything special to avoid this situation?

-Sandra
-------