[ZPT] fill-slot only works in immediately enclosing use-macro?

Brad Clements bkc@murkworks.com
Mon, 3 Dec 2001 16:36:54 -0500


On 3 Dec 2001 at 16:22, Evan Simpson wrote:

> There are a couple of problems with the current setup that I hope to
> address in the next release. In particular, there is no way to explicitly
> spell "I am not filling slot S2".  I plan to introduce a statement,
> possibly called "metal:keep-slot", for this purpose.  Then you could write:
> 
> <span metal:keep-slot="S2" metal:define-slot="S2">redefined</span>
> 
> ...in order to "pass through" a slot definition.  Without the
> "define-slot", this would preserve the default contents of S2, but not make
> the slot available to users of M1.

This seems a little ugly and still requires a bit of work on the user's standpoint.

Would it be possible to keep a "stack" of fill-slots that are "pending" as use-macro's are 
traversed. When a define-slot is encountered, the "bottom most" fill-slot that matches 
the name is used to fill it, if any.

This way the user of a macro could fill a slot, no matter how deeply nested in use-
macro's the define-slot was embedded.

I suppose this means "passing the fill-slot stack" to the recursive function that 
processes use-macros .. ? I'm assuming use-macro's are implemented recursively and 
you don't currently pass "downward" and state information..

Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com               AOL-IM: BKClements