A macro that processes and hides text?

Don't use a command with an argument -- this will always be difficult if catcode changes are involved. Better use the comment package:

\documentclass{article}

\usepackage{comment}
\includecomment{instructor}
%\excludecomment{instructor}
\begin{document}

bllb

\begin{instructor}
some text
\catcode`\%=11
12 %% 13
\catcode`\%=5
\begin{verbatim}
\section
\end{verbatim}

\end{instructor}

\end{document}

Attention: A quote from the documentation:

The opening and closing commands should appear on a line of their own. No starting spaces, nothing after it.

Tags:

Macros

Errors