From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: support thunks as prompts without readline Date: Fri, 09 May 2008 23:36:26 +0100 Message-ID: <87bq3fcdg5.fsf@ossau.uklinux.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210372634 17984 80.91.229.12 (9 May 2008 22:37:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 May 2008 22:37:14 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat May 10 00:37:49 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JubDm-00054H-Jx for guile-devel@m.gmane.org; Sat, 10 May 2008 00:37:46 +0200 Original-Received: from localhost ([127.0.0.1]:57844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JubD4-000258-62 for guile-devel@m.gmane.org; Fri, 09 May 2008 18:37:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JubCZ-0001qc-2Y for guile-devel@gnu.org; Fri, 09 May 2008 18:36:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JubCY-0001q2-4M for guile-devel@gnu.org; Fri, 09 May 2008 18:36:30 -0400 Original-Received: from [199.232.76.173] (port=49351 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JubCX-0001pm-Ej for guile-devel@gnu.org; Fri, 09 May 2008 18:36:29 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:38749) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JubCX-0001gU-2b for guile-devel@gnu.org; Fri, 09 May 2008 18:36:29 -0400 Original-Received: from arudy (host81-129-100-189.range81-129.btcentralplus.com [81.129.100.189]) by mail3.uklinux.net (Postfix) with ESMTP id 3A9B61F6656; Fri, 9 May 2008 23:36:28 +0100 (BST) Original-Received: from laruns (laruns [192.168.0.10]) by arudy (Postfix) with ESMTP id 3879F3800D; Fri, 9 May 2008 23:36:27 +0100 (BST) In-Reply-To: (Andy Wingo's message of "Fri, 09 May 2008 16:43:37 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7232 Archived-At: Andy Wingo 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