Hi,

There is no need to add "push" and "pop" macros. The set-widget and TWs 
locale variable handling does exactly that.

Try the following code: 

\define test() The tiddler knows this text

<$set name=test value="outer text">
1: <<test>><br/>
  <$set name=test value="some inner text">
    2: <<test>><br/>
  </$set>
3: <<test>>
</$set>

4: <<test>>

The \define test() ... command internally creates a "tiddler wide" test 
variable using the set-widget

The first set-widget defines a _new_ variable named test, that is only 
visible between the first <$set> and the _last_ </$set>
So at 1: test will be "outer text"

The second set-widget does the same thing. It creates a new test-variable
At 2: test will be: "some inner text"

The first </$set> closing element will "forget" the inner test-variable and 
activate the outer var again. 
So at 3: test will be "outer text" again

The last macro call at 4: knows the "tiddler global" variable. 

So the first <$set widget call is a "push" command and the first closing 
</$set command is a "pop" command. 

The same mechanism is true for recursive code, but it's a bit more complex. 
... Example will follow.

-mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a13e356e-0ef1-4608-a8e5-bc315c38b1bb%40googlegroups.com.

Reply via email to