guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for ice-9/format.scm (~&)


From: Marius Vollmer
Subject: Re: Patch for ice-9/format.scm (~&)
Date: 09 Jun 2001 19:40:05 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Matthias Koeppe <address@hidden> writes:

> This little patch fixes the behavior of the ~& (fresh line) format
> directive.  FORMAT used to maintain the current column in a global
> variable, thus formats to different ports and other means of output
> did not mix very well (see my recent test-suite addition).  This patch
> makes FORMAT get the initial output column from the port via
> PORT-COLUMN. (See a separate message for a patch that enables
> PORT-COLUMN on output ports.) 

Thanks!  I changed your patch slightly.  I use this

  (and-let* ((col (port-column port)))  ; get current column from port
    (set! format:output-col col))

to initialize output-col.  This makes it carry the state form one call
to format to the next when the port does not maintain its own columns.
What do you think?

2001-06-09  Marius Vollmer  <address@hidden>

        * format.scm: Use (ice-9 and-let-star).
        (format:out): Initialize format:output-col with current column of
        `port', if it has one.  Else leave it alone.  Thanks to Matthias
        Köppe!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]