|
From: Robert D. <rob...@gm...> - 2017-02-26 07:35:52
|
On 2017-02-24, Soegtrop, Michael <mic...@in...> wrote:
> one strange effect I saw today is that before I do a kill(all),
> conjugate(a) is shown with an over-bar, while after kill(all) it is
> shown as conjugate(a).
OK, I see now what's going on. Still not sure if this should be
considered a bug in wxMaxima or in Maxima, but I'm leaning towards
Maxima.
The problem is that kill(all) kills, among other things, the symbols on
the global list props.
(%i1) props;
(%o1) [nset, {, }, trylevel, maxmin, nummod, conjugate, erf_generalized,
beta]
KILL1-ATOM (in src/suprv.lisp) is called on each one of those. Towards
the end of KILL1-ATOM, we see these gyrations:
(when (and (member x *builtin-symbols* :test #'equal)
(gethash x *builtin-symbol-props*))
(setf (symbol-plist x)
(copy-tree (gethash x *builtin-symbol-props*))))
For *BUILTIN-SYMBOLS*, that resets the property list back to whatever it
was when the program was started. Any properties assigned afterward
(e.g. by loading some display code) are nuked.
This is confusing in various ways. Why are we removing Lisp properties
from built-in symbols? If it's meaningful to remove properties from
built-in symbols, why does kill(all) apply that to only a few symbols?
Why are any built-in symbols on the props list, anyway?
This business about removing properties from built-in symbols isn't
documented, which is probably a good thing.
At this point I'm inclined to say that it's OK to remove properties from
built-in symbols, but the props list should not have any built-in
symbols on it. That will prevent kill(all) from changing the properties
of any built-in symbol. kill(foo) would still restore the original
properties of foo.
If nobody objects, I will remove any built-in symbols from props, and
that should fix the problem about display properties of conjugate.
best
Robert Dodier
|