[Top][All Lists]

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

Re: [Chicken-users] format-modular feature request: defining one's own m

From: Robin Lee Powell
Subject: Re: [Chicken-users] format-modular feature request: defining one's own multi-part formats
Date: Fri, 7 Mar 2008 14:27:55 -0800
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Fri, Mar 07, 2008 at 01:39:02PM -0800, Kon Lovett wrote:
> You can override the existing semantics by supplying your own
> procedures. However access to the state object is very restricted
> to the public. So not all functionality that the *formatter-foo*
> provide can be reproduced by an external formatter. And the public
> cannot extend the state object, which might be necessary to
> implement own  "before-and-after escape sequences".

Right; that's exactly what I was asking for as a feature request.

> But that doesn't mean you cannot override the existing semantics. You  
> just cannot do everything.
> (define (formatter-open state start params colon atsign)
>   ... )
> (define (formatter-close state start params colon atsign)
>   ... )

OK, so having done that (and the other stuff you snipped) how do I
get access to everything between ~( and ~), and replace all of it in
the formatted output?  As far as I know, I can't do that without
some form of access to the state object.

It seems to me that you could allow limited access to the state
object; something like (start-long-fomatter 'name) which would do
the sort of state-setup stuff that formatter-cond-start does, and
similarily for formatter-cond-next and formatter-cond-end.  But I
certainly do not understand the format-modular code, so I could be
completely wrong.


Lojban Reason #17:
Proud Supporter of the Singularity Institute - ***

reply via email to

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