Protecting "." commutative status



Hi,

As discussed previously, the vect package defines "." as commutative,
thereby interfering with the use of "." for matrix multiplication (unless
I missed something in the mean time).  I'm trying to make my code safe for
this situation. What I'd ideally like to do is write something like:

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 */
)

Is it possible to write something like with_uncommutative_dot() using
standard Maxima code, and if so, how?

At the moment I'm using the following:

noncommutative_dot_enter():=(
  dot_commutative:member(commutative, properties(".")),
  remove(".", commutative))$

noncommutative_dot_exit():=if dot_commutative then declare(".", commutative)

This suffers from two problems: it involves a global variable, and the
user must remember to do noncommutative_dot_exit evertime.

Actually another nice way of doing it may be by a functional transform.
I.e. I have

some_function_expecting_noncommutative_dot(arg1,arg2,...):= .....

some_function:noncommutative_func(some_function_expecting_noncommutative_dot)

noncommutative_func should preserve the original function's signature
while doing the "." commutative save/restore thing. Is this possible?

Thanks
Neilen