From what you've said, I infer that the category codes for the material inside the \newcommand are determined at the time the code is first encountered, not the time the the \newcommand is processed. (Otherwise one could write
\catcode`\^^M\active
\def\^^M{\par\leavevmode}
and the catcode change would make the def work.)
is that right?