I am using version 10.0.2

If I set

SetAttributes[ol, Orderless]

Then the following expression appears to be highlighted incorrectly after clicking in it (no need to evaluate it)

ol[a_, b_] :> {a, b} (*click in this expression*)

Of course replacements like this still work

ol[1, 2] /. ol[a_, b_] :> {a, b}
{1, 2}

Am I correct in concluding that this is a (small) bug?

Edit: I tested this several times with a fresh kernel, but with a fresh front end the bug does not occur. I will try to see what steps I took to get the front end in this state.


Can somebody please evaluate the following code in one cell and then manually type a space, to see if they get the same incorrect highlighting?

SetAttributes[ol, Orderless]
       RowBox@{"ol", "[", 
          RowBox@{"a_", ",", "b_"}, "]"
          RowBox@{"a", ",", "b"}, "}"
  ] // CellPrint

SelectionMove[EvaluationNotebook[], Before, CellContents]
SelectionMove[EvaluationNotebook[], Next, Character, 11]
  • $\begingroup$ Heya @Kuba :). Em, well the a in the list was blue for me. But not after restarting the front end. $\endgroup$ – Jacob Akkerboom Mar 4 '15 at 13:00
  • $\begingroup$ @Kuba Now only the b is blue for me :P. $\endgroup$ – Jacob Akkerboom Mar 4 '15 at 13:03
  • $\begingroup$ It looks fine in Win7 V10.0.2 :) $\endgroup$ – Kuba Mar 4 '15 at 13:04
  • $\begingroup$ @Kuba how about now? Remember to manually type a space! $\endgroup$ – Jacob Akkerboom Mar 4 '15 at 13:25
  • $\begingroup$ Nice example but sorry, all fine. To cheer you up, from time to time brackets matching hinglighting stays on a screen for me. Don't know how to reproduce that at demand though. $\endgroup$ – Kuba Mar 4 '15 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.