[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested context properties -- an implementation sketch

From: David Kastrup
Subject: Re: Nested context properties -- an implementation sketch
Date: Sun, 14 Aug 2011 21:11:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

"Trevor Daniels" <address@hidden> writes:

> David
> I think we need to clarify a few things first.
> You wrote
>> The semantics can be summarized as follows:
>> a) a revert will only cancel the last _matching_ override, and the
>> match
>>   includes the complete specified property path, _and_ the
>> prospective
>>   use of \once.  \revert will not cancel \once\override and vice
>> versa.
>> b) At the end of a timestep, all \once\override are reverted.  All
>>   non-\once overrides remain in effect and on the stack as if none
>> of
>>   the \once\override had ever happened.
> Will the order of \override and \once \overide within
> the same timestep for the same property matter, or
> does the \once \override always take precedence within
> its timestep?

The order matters with regard to which override determines the active
state of a property (always the last override).  It does not matter for
matching reverts to overrides.

> I'm not clear about stacking.  Will \override be equivalent
> to push and \revert to pop, with the top value left on
> the stack being effective?  Or is there no stack?

There is a stack, and the last active override determines the value.  If
an override is just for a subproperty, it determines the value just for
that subproperty (and its respective subsubproperties).

The exact matching is done for matching reverts (which may for that
reason happen below the stack top) to overrides, not for reading out

>> I have no clear view about \set yet.  It would seem to me that
>> \unset
>> should be equivalent to \revert, and \set should be equivalent to
>> \revert+\override.
> As we are contemplating a major change anyway, I'd
> prefer an equivalence in operation of \override,
> \once \override and \revert with \set, \once \set
> and \unset.  Or is this infeasible?

A sequence of \set \set \set would lead to stack buildup.  That seems
contrary to the spirit of the command name.

On the other hand, a sequence of \set \unset will, under my proposal
which is pretty much the current semantics, cancel a previous override,
while a sequence \override \set \set \set \revert will be neutral,

I don't particularly like all the semantics, but they are reasonably
comprehensible and useful.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]