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: Joel E. Denny
Subject: Re: 2.62 AT_SETUP limitations
Date: Thu, 24 Apr 2008 14:00:38 -0400 (EDT)

On Thu, 24 Apr 2008, Eric Blake wrote:

> | I proposed that the result of m4_dquote be passed to m4_bpatsubst.  I
> | didn't mean that the result of m4_dquote should be passed directly to
> | m4_len.
> 
> The point of the example was to demonstrate what happens if you pass
> arguments to alternate macros, be it m4_len or m4_bpatsubst.  And I had
> hoped that the example would convince you that m4_quote, not m4_dquote,
> was what you were thinking of (effectively, the only difference between
> m4_quote(foo) and m4_expand([foo]) is whether unquoted space after comma
> is stripped).

m4_quote and m4_expand are not needed if the user quotes properly, so I 
wasn't thinking of either.  I agree that m4_quote adds some protection if 
the user doesn't quote properly, and I've used it for this purpose. 
m4_expand seems to add a little bit more protection... but also another 
special exception that can't be avoided just by using normal quoting.

In contrast, I mentioned m4_dquote because it's nice for adding extra 
quotes (to an already properly quoted expanded argument) before invoking 
macros like m4_bpatsubst whose result gets expanded again.

> |> Thus,
> |> using m4_expand provides a minimal-effort QoI improvement to cater to
> people
> |> who don't know how to follow our advice of using proper quoting.
> |
> | This is the answer I was really looking for.
> 
> Glad you agree :)

I meant it's the answer to the question I was really asking: "Why is this 
changequote kludge necessary?"  Personally, I don't like that autoconf 
caters to users who can't or refuse to quote properly.  By doing so, 
autoconf seriously frustrates users who do quote properly but who also 
manage to stumble upon unintuitive special exceptions in autoconf macros.  
Maybe the former group of users is in the majority (but I wonder how they 
survive in the world of m4 at all), and so it's the path of least 
resistance for autoconf developers.  Maybe the latter group has size 1.  
Since I don't maintain autoconf, I don't have to deal with the former 
group, and so my perspective is different than yours.  I can accept that.

Thanks for the explanation.




reply via email to

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