MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

SyntaxInfo/Notebug bug?

  • To: mathgroup at
  • Subject: [mg110803] SyntaxInfo/Notebug bug?
  • From: James Stein <mathgroup at>
  • Date: Wed, 7 Jul 2010 07:42:40 -0400 (EDT)

No surprises if I execute this in a cell:

   ClearAll [ g ];
   SyntaxInformation [ g ]
   g [ x_] := x;
   g [ 3 ]

But if I now execute this in another cell:

   SyntaxInformation [ g ] = {"ArgumentsPattern" -> {_, _}};
   g [ 3 ]

   SyntaxInformation [ g ]

   ClearAll [ g ]
   g [ 3 ]

   SyntaxInformation [ g ]

the output will be as expected, but there is an ugly side effect:

In BOTH cells all calls "g [ 3 ]" now contain a red caret

following the "3", indicating a missing argument.

(I am using Mathematica 7.0.1 on Mac OS X 10.6.4, YMMV).

It seems to me that 'ClearAll' removes syntax information,

as I expected, but this removal is not communicated to the

Notebook front end.  My experience is that the kernel must be

restarted in order to remove the erroneous red caret.

Is this a bug in Mathematica, or in my (mis?)understanding of

  • Prev by Date: Re: PlotLegend-> and DateListPlot[]...incompatible or broken?
  • Next by Date: Re: The side-effects of mixing TraditionalForm inside
  • Previous by thread: Re: Problem with a diagram
  • Next by thread: Re: The side-effects of mixing TraditionalForm inside