Re: m4 brackets question

2011-09-14 Thread Bruno Haible
Eric Blake wrote: > > Which of the following code lines should be changed, for maintainability? > > > >absolute-header.m4:87: s#^/[^/]#//&# > > Underquoted. I'd recommend using | instead of # in the sed snippet Yes, this will be clearer. Thanks for the advice. > >csharpcomp.m4:15:

Re: m4 brackets question

2011-09-14 Thread Bruno Haible
Eric Blake wrote: > > Underquoted (and autoconf has magic in AC_CHECK_DECL that tries to deal > > with the underquoting, since this is so common), since the fourth > > argument of AC_CHECK_DECL is supposed to allow further m4 macro > > expansion when used properly. The same apparently holds for

Re: m4 brackets question

2011-09-14 Thread Bruno Haible
Eric Blake wrote: > Underquoted (and autoconf has magic in AC_CHECK_DECL that tries to deal > with the underquoting, since this is so common), since the fourth > argument of AC_CHECK_DECL is supposed to allow further m4 macro > expansion when used properly. Should be: > > AC_CHECK_DECL([tanl],

Re: m4 brackets question

2011-09-14 Thread Stefano Lattarini
On Tuesday 13 September 2011, Eric Blake wrote: > On 09/13/2011 03:09 PM, Bruno Haible wrote: > > Please, can you turn off these "m4 comments" for Autoconf 3.0? > > You can turn them off yourself with m4_changecom(). > Or use the `@%:@' quadrigraph instead of a literal `#'. I've found that this i

Re: m4 brackets question

2011-09-13 Thread Eric Blake
On 09/13/2011 03:09 PM, Bruno Haible wrote: Please, can you turn off these "m4 comments" for Autoconf 3.0? You can turn them off yourself with m4_changecom(). This hasn't been a regularly requested feature, but I'm worried about the backwards-compatibility aspect of doing it globally. No

Re: m4 brackets question

2011-09-13 Thread Bruno Haible
Hi Eric, > # is a comment character in m4, which reads until > end-of-line to end the comment. Which means all the [] after the > comment character are treated as part of the comment, instead of as m4 > [] quoting. Thanks for explaining. Now I understand it. What is called an "m4 comment" is

Re: m4 brackets question

2011-09-13 Thread Eric Blake
On 09/10/2011 03:23 AM, Bruno Haible wrote: Hi Eric, Again, I've stumbled across a behaviour of brackets in autoconf macros that I don't understand. If in file m4/include_next.m4 at line 210 I add the following code --

Re: m4 brackets question

2011-09-11 Thread Gary V. Vaughan
Hi Bruno, On 10 Sep 2011, at 16:23, Bruno Haible wrote: > Again, I've stumbled across a behaviour of brackets in autoconf macros that > I don't understand. It's just the number of nested quotation levels, with m4 processing always removing the outer level whenever text is passed through it. The