manpagez: man pages & more
info m4
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.4 Deleting a macro

A macro definition can be removed with undefine:

Builtin: undefine (name…)

For each argument, remove the macro name. The macro names must necessarily be quoted, since they will be expanded otherwise.

The expansion of undefine is void. The macro undefine is recognized only with parameters.

foo bar blah
⇒foo bar blah
define(`foo', `some')define(`bar', `other')define(`blah', `text')
foo bar blah
⇒some other text
foo bar blah
⇒foo other text
undefine(`bar', `blah')
foo bar blah
⇒foo bar blah

Undefining a macro inside that macro’s expansion is safe; the macro still expands to the definition that was in effect at the ‘(’.

define(`f', ``$0':$1')
f(f(f(undefine(`f')`hello world')))
⇒f:f:f:hello world

It is not an error for name to have no macro definition. In that case, undefine does nothing.

This document was generated on September 29, 2013 using texi2html 5.0.

© 2000-2017
Individual documents may contain additional copyright information.