| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To rename the existing macro names, use \rename
\rename{name}{new-name}
|
which defines a new macro whose name is new-name, and set the macro name to void.
Each macro has a stack space to hold some different definitions. It is
possible to redefine a macro temporarily, reverting to the previous
definition at a later time.
This is done with the builtins \pushdef and \popdef:
\pushdef{name}{parameters}{expansion}
\popdef{name}
|
These macros work in a stack-like fashion. A macro is temporarily
redefined with \pushdef, which replaces an existing definition of
name, while saving the previous definition, before the new one is
installed. If there is no previous definition, \pushdef behaves
exactly like \define. As a matter of fact, \define is
simply an alias to \pushdef.
If you want to disable a macro temporarily, you can use \pushdef
and \popdef in combination:
\define\nop{}{}
=>
\pushdef\foo{}{\nop}
=>
\foo
=>
\popdef\foo
=>
\foo
=>Hello world.
|