[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: rebinding of *evalhook*
From: SANDRA <hplabs!LOOSEMORE@UTAH-20.ARPA>
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.
This is quite correct. It is impossible to reset the value of *evalhook*
from inside the hook function.
Do other implementations do anything special to avoid this situation?
We (at HP) have a command available always (called "Abort") which places
the user back in the default toploop, which, among other things, turns off the
eval hook function. For example, inside a break loop, it is possible either
to quit (which essentially takes you one level out), or abort to top level.
After abort has been executed, the value of *evalhook* will again be nil.