diff options
author | Andy Wingo <wingo@pobox.com> | 2010-04-09 13:33:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-04-09 13:33:20 +0200 |
commit | 0becb8f316137e6823b2652a33b7212e02722782 (patch) | |
tree | 8d5a9784fb99b386209bcb0feacba5f284cedc41 | |
parent | 01ad5a7ba9edb5d8c96567ed80ea1a34019c5338 (diff) | |
download | guile-0becb8f316137e6823b2652a33b7212e02722782.tar.gz |
repl-reader only prompts if no input is available
* module/ice-9/boot-9.scm (repl-reader): For the default (non-readline)
repl reader, only display the prompt if input isn't already available.
Fixes spurious prompts in the debugger.
-rw-r--r-- | module/ice-9/boot-9.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index f0877b7d5..ffd1f6876 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -2934,7 +2934,8 @@ module '(ice-9 q) '(make-q q-length))}." ;;; the readline library. (define repl-reader (lambda (prompt . reader) - (display (if (string? prompt) prompt (prompt))) + (if (not (char-ready?)) + (display (if (string? prompt) prompt (prompt)))) (force-output) (run-hook before-read-hook) ((or (and (pair? reader) (car reader)) |