> On 26 Jun 2014, at 12:08, Hans Hagen <pra...@wxs.nl> wrote:
> 
> Another addition is that
> 
> \definemode[something][keep]
> 
> define an undefined mode; the keep makes sure that the already set value is 
> kept (another option is 'yes').
> 
> Using defined modes (that is, set with: \enablemode, \disablemode or 
> \definemode) can be tested about twice as fast as undefined modes which can 
> make a small difference 


I do not understand this fully: 
- if the mode is undefined, how can "define an undefined mode" for a mode that 
has already been given a value with either \enablemode or \disablemode keep a 
value? Must not \enablemode, \disablemode do some sort of 'defining' in order 
to facilitate testing? Does "define" here implements some other mechanism than 
the 'defining' done by \enablemod, \disablemode?

Is this what happens:
- if \enablemode or \disablemode has been used before to set a value for the 
mode, than \definemode[themode][keep] stashes some special definition of that 
mode and does not change c.q. transfers its value;
- \definemode[themode][yes] and \definemode[themode][no] always set that value 
for the mode in case, regardless of what has been done by a preceding 
\enablemode or \disablemode.

Is that the correct interpretation? Just to make sure I understand.

Finally, when \definemode makes testing a lot faster why than not implement 
this always? That is, using \enablemode or \disablemode the first time implies 
a \definemode for that mode. Doing so avoids another macro to remember: less 
clutter for my brain ;-)

Hans van der Meer




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to