Hey Neil, On Sat 10 May 2008 00:36, Neil Jerram <[EMAIL PROTECTED]> writes:
> Andy Wingo <[EMAIL PROTECTED]> writes: > >> * ice-9/boot-9.scm (repl-reader): Support thunks as prompts. >> --- >> ice-9/boot-9.scm | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm >> index d1e6306..b92cfd6 100644 >> --- a/ice-9/boot-9.scm >> +++ b/ice-9/boot-9.scm >> @@ -2518,7 +2518,7 @@ >> ;;; the readline library. >> (define repl-reader >> (lambda (prompt) >> - (display prompt) >> + (display (if (string? prompt) prompt (prompt))) >> (force-output) >> (run-hook before-read-hook) >> ((or (fluid-ref current-reader) read) (current-input-port)))) > > I don't get this one. Isn't the thunk option already covered by the > code that calls repl-reader, here: > > (let ((prompt (cond ((string? scm-repl-prompt) > scm-repl-prompt) > ((thunk? scm-repl-prompt) > (scm-repl-prompt)) > (scm-repl-prompt "> ") > (else "")))) > (repl-reader prompt)))) Sorry for the long quote. Answer: It does seem that this case is covered by the scm-style REPL. I'm trying to use the repl-reader for a different repl, the one in guile-vm. The (ice-9 readline) repl-reader does handle the prompt-as-thunk case. I just want them both to act the same :) I could change to call the thunk instead, if that's the best option. Please advise as to what you want to accept. Andy -- http://wingolog.org/