GNU bug report logs - #13077
guile: add repl-option for customized print

Previous Next

Package: guile;

Reported by: Daniel Hartwig <mandyke <at> gmail.com>

Date: Tue, 4 Dec 2012 03:50:02 UTC

Severity: wishlist

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Hartwig <mandyke <at> gmail.com>
To: nalaginrut <nalaginrut <at> gmail.com>
Cc: 13077 <at> debbugs.gnu.org, guile-devel <at> gnu.org
Subject: bug#13077: guile: add repl-option for customized print
Date: Tue, 4 Dec 2012 13:34:52 +0800
[Message part 1 (text/plain, inline)]
On 4 December 2012 13:19, nalaginrut <nalaginrut <at> gmail.com> 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 <at> 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 …)
[0001-repl-add-repl-option-for-customized-print.alt.patch (application/octet-stream, attachment)]

This bug report was last modified 12 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.