When I define a command that defines commands
\def\makefoobar{
\def\foo{foo}
\def\bar{bar}
}
and prefix it with \global
{ \global\makefoobar }
it is treated like
{
\global\def\foo{foo}
\def\bar{bar}
}
keeping the \global
effect only to the first definition, or more precise, the first token of \makefoobar
, may this be a definition or not.
Is there a way to define \makefoobar
so that modifiers like \global
or \long
would affect all macros defined within, or can I only define a global alternative command \gmakefoobar
?
\global
,\long
,\outer
and\protected
(the last one is in e-TeX) only apply to the next token (and they do expansion because a proper token should follow them).