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

clisp top level

My experience is that it's a lot easier to write your own top level than it
is to change the one clisp provides.  The only thing I'd call a "trick" is
that you want to put the read-eval-print inside an unwind-protect that goes
back to the top of the loop (so that aborts from errors won't leave it) -
UNLESS the last thing eval'ed was supposed to exit lisp - otherwise it's 
hard to get out!  The top level I have also does things like keep a history,
allowing you to review or redo events or refer to the values returned, and
also an error catcher that asks whether you want to abort (before it messes
up the screen).  It's also a lot easier to use other streams with your own 
top level - I had lots of trouble trying to change *standard-input* and
*standard-output* with the standard top level.