(re [this question](http://tex.stackexchange.com/questions/27825/why-does-a-defined-command-appear-differently-in-the-align-environment) ) Does somebody know why
{\catcode`\,=\active \gdef,{\mbox{ok}}}
\def\macro{\begingroup \mathcode`\,="8000\relax \macrox}
\def\macrox#1{#1\endgroup}
…
$\macro{,}$
works, while
{\catcode`\,=\active \gdef,{\mbox{ok}}}
\def\macro{\begingroup \mathcode`\,="8000\relax \expandafter\endgroup\macrox}
\def\macrox#1{#1}
…
$\macro{,}$
doesn't?
{\catcode`\,=\active \gdef,{\mbox{ok}}}
\def\macro{\begingroup \mathcode`\,="8000\relax \macrox}
\def\macrox#1{#1\endgroup}
…
$\macro{,}$
works, while
{\catcode`\,=\active \gdef,{\mbox{ok}}}
\def\macro{\begingroup \mathcode`\,="8000\relax \expandafter\endgroup\macrox}
\def\macrox#1{#1}
…
$\macro{,}$
doesn't?