bug-autoconf
[Top][All Lists]
Advanced

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

Re: 2.62 AT_SETUP limitations


From: Noah Misch
Subject: Re: 2.62 AT_SETUP limitations
Date: Tue, 22 Apr 2008 17:54:25 -0700
User-agent: Mutt/1.5.9i

On Tue, Apr 22, 2008 at 06:45:26AM -0600, Eric Blake wrote:
> According to Joel E. Denny on 4/22/2008 2:36 AM:
> | According to Autoconf 2.62's manual, AT_SETUP no longer allows unbalanced
> | parentheses to appear in test case titles.  This regression breaks CVS
> | Bison's test suite, which worked fine with 2.61, and it seems like an
> | unnecessary limitation.

> Because AT_SETUP now uses the newly documented m4_expand macro, which in
> turn REQUIRES balanced () because it temporarily uses
> m4_changequote([(],[)]) to force preservation of unquoted space after
> comma.  In other words, now that () is participating as quote characters,
> it must occur in a balanced manner, regardless of the level of []
> surrounding the usage (since the temporary changequote means that [] is
> not quoting the () usage).  My thinking at the time of implementing this
> restriction was that the user was unlikely to use unbalanced () in a test
> title, but you've proven my guess wrong.

How about this?  Keep the parentheses around for space preservation, but make
them part of a more complex quote string.

2008-04-22  Noah Misch  <address@hidden>

        * lib/m4sugar/m4sugar.m4 (m4_expand): Use less common quotes.

        
--- autoconf/lib/m4sugar/m4sugar.m4.~1.136.~    2008-04-22 16:19:27.000000000 
-0400
+++ autoconf/lib/m4sugar/m4sugar.m4     2008-04-22 20:50:59.643031187 -0400
@@ -709,9 +709,9 @@
 # Exploit that extra () will group unquoted commas and the following
 # whitespace, then convert () to [].  m4_bpatsubst can't handle newlines
 # inside $1, and m4_substr strips quoting.  So we (ab)use m4_changequote.
-m4_define([m4_expand], [_$0(($1))])
+m4_define([m4_expand], [_$0(-=(=-$1-=)=-)])
 m4_define([_m4_expand],
-[m4_changequote([(], [)])$1m4_changequote`'m4_changequote(`[', `]')])
+[m4_changequote([-=(=-], [-=)=-])$1m4_changequote`'m4_changequote(`[', `]')])
 
 
 # m4_ignore(ARGS)




reply via email to

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