Is is possible to write SyntaxInformation of "ArgumentsPattern" for functions of the form:


That is, I get syntax coloring such that the first set of square braces takes exactly 2 arguments, and the second set takes 3?

I tried this:

SyntaxInformation[f[_, _]] = {"ArgumentsPattern" -> {_, _, _}}

But it doesn't take it

  • 3
    $\begingroup$ I don't think so. It must always be defined as SyntaxInformation[f] = sompatterns and somepatterns need to follow a very restricted syntax (as documented). I think that's because they're interpreted by the front end, not the kernel. This is of course just an educated guess. +1 though, interesting question. $\endgroup$
    – Szabolcs
    Nov 23, 2014 at 19:59
  • $\begingroup$ Aw, that's too bad. Thanks for the info though.. $\endgroup$
    – QuantumDot
    Nov 23, 2014 at 21:09
  • $\begingroup$ @Szabolcs Would you kindly turn your comment into an answer? I'll accept and this question will go off the unanswered list. $\endgroup$
    – QuantumDot
    Nov 19, 2015 at 10:32
  • $\begingroup$ Sorry, I really don't want to. [ I asked a similar question](mathematica.stackexchange.com/q/97411/12) where I was sure the answer would be "it's not possible" and it was possible in the end. There's no harm in leaving it unanswered. A developer from WRI might confirm that it is not possible or someone might actually find a solution. $\endgroup$
    – Szabolcs
    Nov 19, 2015 at 12:34

1 Answer 1


This is not currently possible. The SyntaxInformation is set up to color "down values" (definitions of the form f[x_,y_] := ...), not "sub values" (definitons of the form f[x_][y_] := ...).

It's not a bad suggestion with the increase in operator forms.


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.