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

support thunks as prompts, as readline does.

* ice-9/boot-9.scm (repl-reader): Support thunks as prompts.
This commit is contained in:
Andy Wingo 2008-05-09 16:42:44 +02:00
parent d28d59933c
commit 2b70bf0eb3

View file

@ -2526,7 +2526,7 @@ module '(ice-9 q) '(make-q q-length))}."
;;; the readline library. ;;; the readline library.
(define repl-reader (define repl-reader
(lambda (prompt) (lambda (prompt)
(display prompt) (display (if (string? prompt) prompt (prompt)))
(force-output) (force-output)
(run-hook before-read-hook) (run-hook before-read-hook)
((or (fluid-ref current-reader) read) (current-input-port)))) ((or (fluid-ref current-reader) read) (current-input-port))))