# Symbol resolution for contexts inside packages

Say I create \$UserBaseDirectory/Autoload/MyPackage/init.m containing:

BeginPackage["MyPackage"];
Symbol1 = 1;
Begin["MyContext"];
Symbol2 = 2;
End[];
EndPackage[];


When I run Mathematica:

• Symbol1 resolves to MyPackageSymbol1 and is colored black, indicating it has a value assigned.
• MyContextSymbol2 does not resolve, but MyPackageMyContextSymbol2 does. However, there is no autocompletion and the symbol is colored blue (indicating no value assigned) even after evaluation.

Is it possible to configure my package such that MyContextSymbol2 will resolve and have all the front-end niceties?

• I believe this question is answered here: (29324) (I am sorry no one directed you to this Q&A sooner.) – Mr.Wizard Sep 15 '14 at 14:18

BeginPackage["MyPackage"];
Begin["MyContext"];
`