Redefined M4 Macros
-------------------
With a few exceptions, all the M4 native macros are moved in the
`m4_' pseudo-namespace, e.g., M4sugar renames `define' as `m4_define'
etc.
Some M4 macros are redefined, and are slightly incompatible with
their native equivalent.
- Macro: dnl
This macro kept its original name: no `m4_dnl' is defined.
- Macro: m4_defn (MACRO)
Contrary to the M4 builtin, this macro fails if MACRO is not
defined. See `m4_undefine'.
- Macro: m4_exit (EXIT-STATUS)
This macro corresponds to `m4exit'.
- Macro: m4_if (COMMENT)
- Macro: m4_if (STRING-1, STRING-2, EQUAL, [NOT-EQUAL])
- Macro: m4_if (STRING-1, STRING-2, EQUAL, ...)
This macro corresponds to `ifelse'.
- Macro: m4_undefine (MACRO)
Contrary to the M4 builtin, this macro fails if MACRO is not
defined. Use
m4_ifdef([MACRO], [m4_undefine([MACRO])])
to recover the behavior of the builtin.
- Macro: m4_bpatsubst (STRING, REGEXP, [REPLACEMENT])
This macro corresponds to `patsubst'. The name `m4_patsubst' is
kept for future versions of M4sh, on top of GNU M4 which will
provide extended regular expression syntax via `epatsubst'.
- Macro: m4_popdef (MACRO)
Contrary to the M4 builtin, this macro fails if MACRO is not
defined. See `m4_undefine'.
- Macro: m4_bregexp (STRING, REGEXP, [REPLACEMENT])
This macro corresponds to `regexp'. The name `m4_regexp' is kept
for future versions of M4sh, on top of GNU M4 which will provide
extended regular expression syntax via `eregexp'.
- Macro: m4_wrap (TEXT)
This macro corresponds to `m4wrap'.
You are encouraged to end TEXT with `[]', so that there are no
risks that two consecutive invocations of `m4_wrap' result in an
unexpected pasting of tokens, as in
m4_define([foo], [Foo])
m4_define([bar], [Bar])
m4_define([foobar], [FOOBAR])
m4_wrap([bar])
m4_wrap([foo])
=>FOOBAR