autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: m4_wrap behavior


From: Paul Eggert
Subject: Re: m4_wrap behavior
Date: Mon, 19 Jun 2006 16:22:00 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> Last but not least m4parw is a really ugly name.  ;-)

Well, I suggested 'm4parw' because I didn't want people to use it.  :-)

> I propose this documentation along with it, and, given absence of
> comments, will apply both patches together in a day or two.

I like this idea.  However, the documentation could stand a bit more
improvement.  I installed the following patch to handle the
documentation part, and will let you install Stepan's patch at your
convenience.

Just to double check, I assume you're talking about installing this patch
(there have been so many flying around lately that I lost context at first):

http://lists.gnu.org/archive/html/autoconf-patches/2006-06/txtYHLZUY8J6U.txt


2006-06-19  Paul Eggert  <address@hidden>
        and Ralf Wildenhues  <address@hidden>

        * NEWS: Document that m4wrap/m4_wrap might not be LIFO.
        * doc/autoconf.texi (): Likewise.
        Rework example of m4wrap token-pasting trouble so that it doesn't
        care whether it's LIFO or FIFO.
        Fix some "contrary to"s that are awkward in English.

--- NEWS        6 Jun 2006 06:18:40 -0000       1.381
+++ NEWS        19 Jun 2006 23:10:09 -0000
@@ -1,5 +1,9 @@
 * Major changes in Autoconf 2.59e
 
+** Autoconf no longer depends on whether m4wrap is FIFO (as Posix requires)
+  or LIFO (as in GNU m4 1.4.x).  GNU m4 2.0 is expected to conform to Posix
+  here, so m4wrap/m4_wrap users should no longer depend on LIFO behavior.
+
 * Major changes in Autoconf 2.59d
 
   Released 2006-06-05, by Ralf Wildenhues.
--- doc/autoconf.texi   16 Jun 2006 20:38:03 -0000      1.1051
+++ doc/autoconf.texi   19 Jun 2006 23:10:10 -0000
@@ -4300,9 +4300,10 @@ If the @code{fnmatch} function conforms 
 @code{HAVE_FNMATCH}.  Detect common implementation bugs, for example,
 the bugs in Solaris 2.4.
 
-Note that for historical reasons, contrary to the other specific
+Unlike the other specific
 @code{AC_FUNC} macros, @code{AC_FUNC_FNMATCH} does not replace a
-broken/missing @code{fnmatch}.  See @code{AC_REPLACE_FNMATCH} below.
+broken/missing @code{fnmatch}.  This is for historical reasons.
+See @code{AC_REPLACE_FNMATCH} below.
 @end defmac
 
 @defmac AC_FUNC_FNMATCH_GNU
@@ -9316,8 +9317,8 @@ m4 --reload-state=4.m4f input.m4
 Produce a frozen state file.  @command{autom4te} freezing is stricter
 than M4's: it must produce no warnings, and no output other than empty
 lines (a line with white space is @emph{not} empty) and comments
-(starting with @samp{#}).  Please, note that contrary to @command{m4},
-this options takes no argument:
+(starting with @samp{#}).  Unlike @command{m4}'s similarly-named option,
+this option takes no argument:
 
 @example
 autom4te 1.m4 2.m4 3.m4 --freeze --output=3.m4f
@@ -9592,7 +9593,7 @@ This macro kept its original name: no @c
 
 @defmac m4_defn (@var{macro})
 @msindex{defn}
-Contrary to the M4 builtin, this macro fails if @var{macro} is not
+Unlike the M4 builtin, this macro fails if @var{macro} is not
 defined.  See @code{m4_undefine}.
 @end defmac
 
@@ -9624,7 +9625,7 @@ provide extended regular expression synt
 
 @defmac m4_popdef (@var{macro})
 @msindex{popdef}
-Contrary to the M4 builtin, this macro fails if @var{macro} is not
+Unlike the M4 builtin, this macro fails if @var{macro} is not
 defined.  See @code{m4_undefine}.
 @end defmac
 
@@ -9639,23 +9640,26 @@ provide extended regular expression synt
 @msindex{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
+Posix requires arguments of multiple @code{m4wrap} calls to be
+reprocessed at @acronym{EOF} in the same order as the original calls.
address@hidden M4 versions through 1.4.x, however, reprocess them in
+reverse order.  Your code should not depend on the order.
+
+You are encouraged to end @var{text} with @samp{[]}, to avoid unexpected
+token pasting between consecutive invocations of @code{m4_wrap}, as in:
 
 @example
-m4_define([foo], [Foo])
-m4_define([bar], [Bar])
-m4_define([foobar], [FOOBAR])
-m4_wrap([bar])
+m4_define([foo], [bar])
+m4_define([foofoo], [OUCH])
+m4_wrap([foo])
 m4_wrap([foo])
address@hidden
address@hidden
 @end example
 @end defmac
 
 @defmac m4_undefine (@var{macro})
 @msindex{undefine}
-Contrary to the M4 builtin, this macro fails if @var{macro} is not
+Unlike the M4 builtin, this macro fails if @var{macro} is not
 defined.  Use
 
 @example




reply via email to

[Prev in Thread] Current Thread [Next in Thread]