1
$\begingroup$

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.

Edit2

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]
Cell[BoxData@
    RowBox@{
       RowBox@{"ol", "[", 
          RowBox@{"a_", ",", "b_"}, "]"
       }
     , 
     "\[RuleDelayed]"
     , 
       RowBox@{"{", 
          RowBox@{"a", ",", "b"}, "}"
       }
     }, 
  "Input"
  ] // CellPrint

SelectionMove[EvaluationNotebook[], Before, CellContents]
SelectionMove[EvaluationNotebook[], Next, Character, 11]
$\endgroup$
7
  • $\begingroup$ Heya @Kuba :). Em, well the a in the list was blue for me. But not after restarting the front end. $\endgroup$ Mar 4, 2015 at 13:00
  • $\begingroup$ @Kuba Now only the b is blue for me :P. $\endgroup$ Mar 4, 2015 at 13:03
  • $\begingroup$ It looks fine in Win7 V10.0.2 :) $\endgroup$
    – Kuba
    Mar 4, 2015 at 13:04
  • $\begingroup$ @Kuba how about now? Remember to manually type a space! $\endgroup$ Mar 4, 2015 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, 2015 at 13:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.