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

$Pre

$Pre
is a global variable whose value, if set, is applied to every input expression.
  • Unless $Pre is assigned to be a function which holds its arguments unevaluated, input expressions will be evaluated before $Pre is applied, so the effect of $Pre will be the same as $Post.
  • $Pre is applied to expressions, while $PreRead is applied to strings which have not yet been parsed into expressions.
By default, $Pre is not defined, meaning the input is evaluated directly:
Save input expressions in held form:
Evaluation works as expected:
Restore $Pre to its default:
The variable holds the inputs in unevaluated form:
By default, $Pre is not defined, meaning the input is evaluated directly:
In[1]:=
Click for copyable input
Out[1]=
 
Save input expressions in held form:
In[1]:=
Click for copyable input
Evaluation works as expected:
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Restore $Pre to its default:
In[4]:=
Click for copyable input
The variable holds the inputs in unevaluated form:
In[5]:=
Click for copyable input
Out[5]=
New in 1