Is there any way to have the same syntax coloring with SyntaxInformation that Block has?
SyntaxInformation[func] = {"ArgumentsPattern" -> {{__}, _},
"LocalVariables" -> {"Solve", {1, Infinity}}};
func[vars : {__}, body_] := {};
After evaluating the above definition, the following two lines have different coloring:
func[{parameter, variable, constant = 0}, parameter + variable + constant]
Block[{parameter, variable, constant = 0}, parameter + variable + constant]

As you can notice, any local variable with an initial value is not highlighted as local. I use the default syntax coloring, no changes were applied. SyntaxInformation accepts the following values: {"Table", "Solve", "Integrate", "Limit", "Plot", "Manipulate"} none of which produces the same behaviour as Block does. Perhaps someone knows about an undocumented option value?
FunctionInformation2.m) containing syntax and usage information for almost all symbols, but not forBlock,Module,WithorDynamicModule. All their"LocalVariables"information is missing. The only new type for"LocalVariables"that I could found is"D"which might be identical to"Integrate". – István Zachar Dec 12 '13 at 21:45{"Module", {{__}, _}}, but nothing more. Guess we'll have to wait for someone from WRI to answer this puzzle.. (Strange I didn't get the comment notice. Sorry for reply late.) – Silvia Dec 14 '13 at 02:09func[...constant=0...], the value ofconstantis going to be defined as 0 in the notebook, so it is not local and should not be colored as local. – Stitch Nov 29 '16 at 01:10Blockcolorconstantas a local variable then? Semantically,constantis not a local variable of course, but syntactically it is. I omitted the definition offuncfor sake of simplicity, but it is meant to be a scoping function which holds and localizes variables listed in its first argument. Even if you implement it asBlock, syntax coloring won't be right. – István Zachar Nov 29 '16 at 09:46funcasBlockhas. (So thatfuncwon't assign the provided value to the symbolconstant, leaving it undefined after usage.) EDIT: With an attribute like HoldFirst? – Gyebro Nov 30 '16 at 15:35HoldAllor similar. See for example Leonid'sLetLhere which is a scoping construct similar toWith. – István Zachar Dec 01 '16 at 15:48"SystemFiles"directory for any symbol containingSyntaxin their name, but got nothing that gives newSyntaxInformationforms. I'll try expanding the scrape and including strings that have"Syntax"too. – b3m2a1 Dec 15 '16 at 11:30