Requesting input on some possible low-level changes
Subject: Requesting input on some possible low-level changes
From: Wolfgang Jenkner
Date: 04 Sep 2003 04:24:35 +0200
James Amundson <amundson@users.sourceforge.net> writes:
> 5) to_lisp() or ctrl-c send the user to the underlying Lisp's
> read-eval-print loop.
>
> 6) Lisp errors send the user to the underlying Lisp's debugger.
>
> While items (1)-(4) can easily be modified to send the appropriate
> additional prompts, items (5) and (6) present a real problem.
Why don't you find it enough to do (in RUN) something like
(with-simple-restart
(macsyma-quit "Macsyma top-level")
(handler-case
(macsyma-top-level input-string batch-flag)
(condition () (invoke-restart 'macsyma-quit))))
This will certainly dispose of your item (6) (we should choose a more
specific type of condition, though).
Since everybody wants to keep TO_LISP() anyway, this leaves us just
with the C-c issue, which seems to be system dependent (On both CLISP
and SBCL C-c signals a condition, but on SBCL it is not handled by the
form above, for some reason)
Apparently, they did quite a similar thing at
telnet://maxima.franz.com
(Tracing the macro WITH-SIMPLE-RESTART will show how they changed the
source code).
Wolfgang