1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

,x unbound does not quit repl

* module/system/repl/repl.scm (run-repl): Catch errors executing
  metacommands. Feature on top of feature...
This commit is contained in:
Andy Wingo 2010-08-06 17:28:10 +02:00
parent 66ad445dcf
commit 5bc97ad5dd

View file

@ -121,10 +121,20 @@
(cond
((eqv? exp *unspecified*)) ; read error, pass
((eq? exp meta-command-token)
(catch 'quit
(lambda () (meta-command repl))
(catch #t
(lambda ()
(meta-command repl))
(lambda (k . args)
(abort args))))
(if (eq? k 'quit)
(abort args)
(begin
(format #t "While executing meta-command:~%" string)
(pmatch args
((,subr ,msg ,args . ,rest)
(display-error #f (current-output-port) subr msg args rest))
(else
(format #t "ERROR: Throw to key `~a' with args `~s'.\n" key args)))
(force-output))))))
((eof-object? exp)
(newline)
(abort '()))