From: Akim Demaille Date: Fri, 3 Aug 2001 09:11:37 +0000 (+0000) Subject: * doc/autoconf.texi (Redefined M4 Macros): Document m4_exit, X-Git-Tag: AUTOCONF-2.52d~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9429dfeb9cff8fd602c2a1c1eafe9f65c68a3b6a;p=thirdparty%2Fautoconf.git * doc/autoconf.texi (Redefined M4 Macros): Document m4_exit, m4_if, and m4_wrap. --- diff --git a/ChangeLog b/ChangeLog index 2abf990d0..8358d2654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-03 Akim Demaille + + * doc/autoconf.texi (Redefined M4 Macros): Document m4_exit, + m4_if, and m4_wrap. + 2001-08-03 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_init): Also forbid `_m4_*' tokens. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 9eec6054a..67e59d3cd 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6430,13 +6430,17 @@ M4sugar''. @node Redefined M4 Macros, Forbidden Patterns, Programming in M4sugar, Programming in M4sugar @subsection Redefined M4 Macros -All the M4 native macros are moved in the @samp{m4_} pseudo-namespace, -e.g., M4sugar renames @code{define} as @code{m4_define} etc. There is -one exception: @code{dnl} kept its original name, and no @code{m4_dnl} -is defined. +With a few exceptions, all the M4 native macros are moved in the +@samp{m4_} pseudo-namespace, e.g., M4sugar renames @code{define} as +@code{m4_define} etc. -M4sugar redefines some M4 macros, and made them slightly incompatible -with their native equivalent. +Some M4 macros are redefined, and are slightly incompatible with their +native equivalent. + +@defmac dnl +@msindex dnl +This macro kept its original name: no @code{m4_dnl} is defined. +@end defmac @defmac m4_defn (@var{macro}) @msindex defn @@ -6444,6 +6448,18 @@ Contrary to the M4 builtin, this macro fails if @var{macro} is not defined. See @code{m4_undefine}. @end defmac +@defmac m4_exit (@var{exit-status}) +@msindex m4_exit +This macro corresponds to @code{m4exit}. +@end defmac + +@defmac m4_if (@var{comment}) +@defmacx m4_if (@var{string-1}, @var{string-2}, @var{equal}, @ovar{not-equal}) +@defmacx m4_if (@var{string-1}, @var{string-2}, @var{equal}, ...) +@msindex m4_if +This macro corresponds to @code{ifelse}. +@end defmac + @defmac m4_undefine (@var{macro}) @msindex undefine Contrary to the M4 builtin, this macro fails if @var{macro} is not @@ -6463,6 +6479,24 @@ Contrary to the M4 builtin, this macro fails if @var{macro} is not defined. See @code{m4_undefine}. @end defmac +@defmac m4_wrap (@var{text}) +@msindex m4_wrap +This macro corresponds to @code{m4wrap}. + +You are encouraged to end @var{text} with @samp{[]}, so that there are +no risks that two consecutive invocations of @code{m4_wrap} result in an +unexpected pasting of tokens, as in + +@example +m4_define([foo], [Foo]) +m4_define([bar], [Bar]) +m4_define([foobar], [FOOBAR]) +m4_wrap([bar]) +m4_wrap([foo]) +@result{}FOOBAR +@end example +@end defmac + @node Forbidden Patterns, , Redefined M4 Macros, Programming in M4sugar @subsection Forbidden Patterns