One can activate e only in math mode and only as a math character with mathcode "8000, that doesn't interfere with macro name scanning:
\documentclass[a4paper]{article}
\begingroup\lccode`~=`e\lowercase{\endgroup
\edef~{\noexpand\mathrm{\mathchar\the\mathcode`e}}}
\mathcode`e="8000
\begin{document}
$e^x\leq e^y$
\end{document}
but I advise against using such an approach. It's better to have a macro \euler or any other name.
In order to use the special "8000 mathcode assigned to e, there must exist a valid definition of e as active character. Therefore the well-known \lowercase trick (many commands used there have e in their names).
ean active character (like~) and let it test if the next character is^and then expand to\mathrm{e}, but this would be kind of overkill and would break other usages ofe, like it is no longer allowed in macro names! You could limit this just to mathmode, which would improve that situation. I personally would go for the mentioned\eor search&replace using your editor. – Martin Scharrer Apr 13 '11 at 16:33ean active character, but I think that would be a disaster. Is this just in math mode? If so, makeeactive only in math mode may work, but again could be problematic. – Joseph Wright Apr 13 '11 at 16:34e^with\mathrm{e}^makes more sense. – Apr 13 '11 at 17:37xesearchpackage can do this. (But Herbert is probably right.) – Aaron Apr 13 '11 at 17:56