summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-06-10 13:41:44 +0200
committerAndy Wingo <wingo@pobox.com>2010-06-10 14:15:26 +0200
commitc7317beca603d1a43b2490ba91e1a9df9779eafe (patch)
treec24d7a2430154ac2768851e886bce1e2c0aa2b21
parent7b69cafd0a2dd77fe39396b6c755a2240f4c372b (diff)
downloadguile-c7317beca603d1a43b2490ba91e1a9df9779eafe.tar.gz
bind debugging i/o ports in start-repl
* module/system/repl/repl.scm (start-repl): If the debugging ports are unbound, bind them to the current i/o ports. Allows errors within with-output-to-foo / with-input-from-foo to be sensibly debugged.
-rw-r--r--module/system/repl/repl.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index 697d6a1b5..523f3bb8f 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -68,6 +68,10 @@
(if welcome
(repl-welcome repl))
(with-fluids ((*repl-level* level)
+ (*debug-input-port*
+ (or (fluid-ref *debug-input-port*) (current-input-port)))
+ (*debug-output-port*
+ (or (fluid-ref *debug-output-port*) (current-output-port)))
(the-last-stack #f))
(let prompt-loop ()
(let ((exp (prompting-meta-read repl)))