This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


is a global variable which, if set, is applied to the name and context of each new symbol that Mathematica creates.
  • The name and context of the symbol are given as strings.
  • $NewSymbol is applied before the symbol is actually created. If the action of $NewSymbol causes the symbol to be created, perhaps in a different context, then the symbol as created will be the one used.
  • $NewSymbol is not applied to symbols automatically created by scoping constructs such as Module.
Set $NewSymbol to a function that prints the name and context when a new symbol is created:
Click for copyable input
Click for copyable input
Restore $NewSymbol to its default:
Click for copyable input
New in 2