TeX question, though.
Suppose I want to define macros \foo and \bar such that
\foo mumble \bar
has the same effect as
\fbox{mumble} ?
I thought \def\foo{\fbox\begingroup} \def\bar{\endgroup} was supposed to work, but it doesn't seem to. Straightforward solutions of the form \def\foo#1\bar{\fbox{#1}} are also disqualified for mysterious reasons due to the context this problem appears in for me.