CTRL-C while in the repl now throws back into the repl no matter

where an exception occurs.
This commit is contained in:
Abdulaziz Ghuloum 2008-12-08 02:13:40 -05:00
parent 75d2756bd2
commit 6041597a27
2 changed files with 61 additions and 53 deletions

View File

@ -62,10 +62,8 @@ description:
(reset-input-port! (console-input-port))
(k))
(define wait
(lambda (eval-proc escape-k)
(call/cc
(lambda (k)
(define wait1
(lambda (eval-proc k escape-k)
(display-prompt 0)
(let ([x (with-exception-handler
(lambda (ex)
@ -115,7 +113,6 @@ description:
(lambda (v)
(pretty-print v (console-output-port)))
v*))))))]))))
(wait eval-proc escape-k)))
(define do-new-cafe
(lambda (eval-proc)
@ -124,7 +121,18 @@ description:
(lambda ()
(call/cc
(lambda (k)
(wait eval-proc k))))
(let loop ()
(call/cc
(lambda (k1)
(with-exception-handler
(lambda (ex)
(with-exception-handler k1
(lambda ()
(flush-output-port (console-output-port))
(newline (console-output-port))
(reset k1))))
(lambda () (wait1 eval-proc k1 k)))))
(loop)))))
(lambda () (set! eval-depth (fxsub1 eval-depth))))))
(define default-cafe-eval

View File

@ -1 +1 @@
1702
1703