[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for ice-9/format.scm (~&)
From: |
Matthias Koeppe |
Subject: |
Re: Patch for ice-9/format.scm (~&) |
Date: |
11 Jun 2001 11:47:10 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6 |
Marius Vollmer <address@hidden> writes:
> 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.
>
> 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?
I think that it is a bad idea. Format should not carry global state.
It will break unexpectedly if you format to _two_ ports that don't
maintain their own columns.
Would you also commit the related test-suite additions I posted
recently? (Sorry for the strange messages without subject etc.; I was
having trouble with the mailer.)
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
- Patch for ice-9/format.scm (~&), Matthias Koeppe, 2001/06/05
- Re: Patch for ice-9/format.scm (~&), Marius Vollmer, 2001/06/09
- Re: Patch for ice-9/format.scm (~&),
Matthias Koeppe <=
- Re: Patch for ice-9/format.scm (~&), Marius Vollmer, 2001/06/13
- Re: Patch for ice-9/format.scm (~&), Rob Browning, 2001/06/13
- Re: Patch for ice-9/format.scm (~&), Matthias Koeppe, 2001/06/14
- Re: Patch for ice-9/format.scm (~&), Marius Vollmer, 2001/06/14
- Re: Patch for ice-9/format.scm (~&), Matthias Koeppe, 2001/06/15