unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: support thunks as prompts without readline
Date: Mon, 12 May 2008 21:15:16 +0200	[thread overview]
Message-ID: <m31w47l4fv.fsf@pobox.com> (raw)
In-Reply-To: <87bq3fcdg5.fsf@ossau.uklinux.net> (Neil Jerram's message of "Fri, 09 May 2008 23:36:26 +0100")

Hey Neil,

On Sat 10 May 2008 00:36, Neil Jerram <neil@ossau.uklinux.net> writes:

> Andy Wingo <wingo@pobox.com> 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/




  reply	other threads:[~2008-05-12 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09 14:43 support thunks as prompts without readline Andy Wingo
2008-05-09 22:36 ` Neil Jerram
2008-05-12 19:15   ` Andy Wingo [this message]
2008-05-12 20:25     ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31w47l4fv.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=neil@ossau.uklinux.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).