Discussion:
environments
(too old to reply)
Efraim Yawitz
2008-11-23 09:42:52 UTC
Permalink
I see from the source code of lout that there are some keywords about
"Environments", but I don't see this explained anywhere in the docs,
except one short mention in the section about Contexts which doesn't
say anything about how to use them. Is this something which can be
used, and how?

Thanks,

Ephraim
Ludovic Courtès
2008-11-25 15:09:36 UTC
Permalink
Hello,
Post by Efraim Yawitz
I see from the source code of lout that there are some keywords about
"Environments", but I don't see this explained anywhere in the docs,
except one short mention in the section about Contexts which doesn't
say anything about how to use them. Is this something which can be
used, and how?
You might want to look in the Expert's Guide at how font settings are
handled, for example, as well as `@SetContext' which is essentially a
generalization of this mechanism (it uses the `CONTEXT' struct in the C
code, which is part of the `STYLE' struct; the latter provides font
settings and the likes).

This CONTEXT/STYLE mechanism is akin to "fluids" or "SRFI-39 parameters"
in Scheme or similar Lispy languages (aka. "dynamically-scoped
variables").

Hope this helps,
Ludo'.

Loading...