Protecting "." commutative status



On 7/15/07, Neilen Marais <nmarais at sun.ac.za> wrote:

> with_uncommutative_dot(
> /* with_uncommutative_dot automaticazlly save the current commutative
> state of "." and remove(".", commutative)*/
> code,
> more code,
> even more
> /* The status of "." is restored to whatever it was before entering
> with_uncommutative_dot */
> )

Maybe the "local" function can help here.
e.g. block(local("."), ...)
where the ... includes some new property declarations for ".".
On returning from the block, the previous properties of "."
are supposed to be restored. I didn't actually try this, if you
try it you can let us know if it works.

Bear in mind that the properties of "." are actually
associated with the symbol MNCTIMES (and likewise
for other operators such as "+", "*", etc. -- these are
associated with MPLUS, MTIMES, etc.).
I don't know if local saves/restores the properties of
"." or MNCTIMES or both.

best
Robert Dodier