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.