I wonder if the following behaviour of SyntaxInformation
is a bug: I want a function f
to accept one argument and options, so I use
Options[f] = {foo->1};
SyntaxInformation[f] = {"ArgumentsPattern"->{_,OptionsPattern[]}};
The output of
{f[], f[a], f[a, foo -> 1], f[a, bar -> 2], f[a, b], f[a, b, foo -> 3], f[a, b, bar -> 4]}
The first four results are as I expect them to be, but the second argument b
should also be coloured red. Am I missing something or is this a bug of SyntaxInformation
?