This answer is focussed at more experienced users, to provide a way for them to find out more information. I do not discuss how anything works.
Information in this answer corresponds to version 10.3
Despite the fact that PrintDefinitions@SyntaxInformation
gives nothing, we can still see how the function works, by doing
<< GeneralUtilites`
PrintDefinitions@System`Utilities`GetSystemSyntaxInformation
System`Utilities`GetSystemSyntaxInformation
is pretty much equivalent to SyntaxInformation
.
From the definition of System`Utilities`GetSystemSyntaxInformation
, we see that the full list of "options of SyntaxInformation
" is
(*sio is short for SyntaxInformation options*)
sio = {"ArgumentsPattern", "OptionNames", "LocalVariables", "ColorEqualSigns"}
Of these options "OptionNames"
is undocumented (see this answer for an example of use, credit to jkuczm)
The following procedure gives a list of basic template names
informationFile =
ToFileName[{$InstallationDirectory, "SystemFiles", "Kernel",
"TextResources", $Language}, "FunctionInformation.m"];
(*sife is short for System Information File Expression*)
sife = If[FileType[informationFile] === File,
Get[informationFile], {}];
templatesWithNames=
Select[
sife[[1,2]]
,
Length@#>3&&#[[4]]=!= None&
][[All,{1,4}]];
DeleteDuplicates@templatesWithNames[[All,2,1]]
{"Manipulate", "Solve", "Plot", "Table", "D", "Integrate", "Limit",
"SumSign", "IntegralSign"}
Of these, {"D", "IntegralSign", "SumSign"}
do not appear in the docs.
I had forgotten about the "Lexical"
modifier, but that is not undocumented, see the details section of the docs). Here are some examples of templates that involve it and also one that does not.
manipulateTemplates =
Select[templatesWithNames, #[[2, 1]] == "Manipulate" &]
{"Animate",{"Manipulate",{2,∞},"Lexical"}}
{"ControllerManipulate",{"Manipulate",{2,∞},"Lexical"}}
{"Manipulate",{"Manipulate",{2,∞},"Lexical"}}
{"RepeatingElement",{"Manipulate",{2}}}
Also this is weird
"ArgumentsPattern" /. SyntaxInformation@EmbedCode
{_, Optional["/Volumes/Jenkins/workspace/Documentation.Usage.English.release/scratch"],
_., OptionsPattern[]}