Skip to content

Commit dc67492

Browse files
committed
Function for creating the list of built-in symbols with the Mathematica version.
1 parent f4164b5 commit dc67492

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

resources/mathematica/FunctionInformation.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
CreateCompletionInformation::usage = "CreateCompletionInformation[] returns a list of strings where each element is an \
1818
entry of the .properties file that is used to enable autocompletion in idea.";
19+
CreateSymbolVersions::usage = "CreateSymbolVersions[] creates a list all symbols in the form {sym1 -> $VersionNumber, \
20+
sym2 -> $VersionNumber}. CreateSymbolVersions[list] updates a list of versioned symbol with the current $VersionNumber.";
21+
1922

2023
Begin["`Private`"] (* Begin Private Context *)
2124

@@ -42,6 +45,11 @@
4245

4346
names = Sort[Flatten[ makeContextNames /@ {"System`", "Developer`", "Internal`", "JLink`"} ]];
4447

48+
CreateSymbolVersions[] := Thread[names -> $VersionNumber];
49+
CreateSymbolVersions[existingNames_List] := With[{version = $VersionNumber},
50+
existingNames /. (Function[n, (n -> _) :> (n -> version)] /@ names)
51+
];
52+
4553
isFunction[str_String] :=
4654
With[{usg =
4755
ToString[

0 commit comments

Comments
 (0)