guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: support thunks as prompts without readline


From: Neil Jerram
Subject: Re: support thunks as prompts without readline
Date: Fri, 09 May 2008 23:36:26 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Andy Wingo <address@hidden> 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))))

Regards,
     Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]