Subject: Re: bug#13077: guile: add repl-option for customized print

From: nalaginrut <[email-masked]>
Date: Tue, 04 Dec 2012 14:30:36 +0800

I'll post my original guile-colorized which uses 'before-print-hook' to
guile-dev. Though I've already tested it, I wish all folks test it for
me. 
And I'll update it to repl-option version after ludo/andy accepts your
patch.

Or I should post it include your patch altogether? ;-) 

On Tue, 2012-12-04 at 13:34 +0800, Daniel Hartwig wrote:
> On 4 December 2012 13:19, nalaginrut <[email-masked]> wrote:
> > Hi Daniel!
> > I believe this patch simplified my work, and 'colorized' module has been
> > finished, I'm testing and debugging.
> > I'll post it when it's all done.
> 
> Glad to hear it.
> 
> Attached is an alternate patch that handles before-print-hook and
> *unspecified* outside of the custom print procedure, to avoid the need
> for boilerplate there.
> 
> --
> scheme@(guile-user)> (define (repl-print* repl val)
>                        (format #t "~20@y" val)
>                        (newline))
> scheme@(guile-user)> (use-modules (system repl common))
> scheme@(guile-user)> (repl-option-set! (car (fluid-ref *repl-stack*))
> 'print repl-print*)
> scheme@(guile-user)> (use-modules (srfi srfi-1))
> scheme@(guile-user)> (iota 20)
> $1 = (0 1 2 3 4 5 6 7 …)