[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Little patch to make (ice-9 pretty-print) more flexible
From: |
Matthias Koeppe |
Subject: |
Re: Little patch to make (ice-9 pretty-print) more flexible |
Date: |
Tue, 08 Jan 2002 15:04:19 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (sparc-sun-solaris2.7) |
Marius Vollmer <address@hidden> writes:
> Matthias Koeppe <address@hidden> writes:
>
>> The new procedure PRETTY-PRINT-WITH-OPTIONS allows specifying the
>> line width, a per-line prefix and whether to use WRITE or DISPLAY.
>
> Nice, we should include this. However, the name
> pretty-print-with-options sounds a bit unfortunate. Would it make
> sense to extend the original pretty-print to also take the new
> options? We could make it so that when the second arg is not a
> keyword, we use it as the port to print to. Like
>
> (define (pretty-print obj . opts)
> (if (pair? opts)
> (if (keyword? (car opts))
> (apply pretty-print-with-options obj opts)
> (apply pretty-print-with-options obj #:port (car opts) (cdr
> opts)))
> (pretty-print-with-options obj)))
>
> and don't export pretty-print-with-options.
That's fine for me, go ahead.
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
- Re: Little patch to make (ice-9 pretty-print) more flexible,
Matthias Koeppe <=