[Top][All Lists]

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

Re: fix AT_SETUP's sh-escaping

From: Stepan Kasal
Subject: Re: fix AT_SETUP's sh-escaping
Date: Thu, 26 Oct 2006 14:13:56 +0200
User-agent: Mutt/

Hello Joel,
  thank you for all your hard work!

On Thu, Oct 26, 2006 at 02:24:23AM -0400, Joel E. Denny wrote:
> [...]  I didn't realize that allowing the 
> possibility was a general interface convention, but I guess that does at 
> least keep the macro interfaces easier to remember.

I like the way you put it!  This is exactly the reason.

In history, many AC_* macros ``double-quoted'' its parameters,
because it seemed to be the right thing to do when they were written.
But these macros had to be fixed later, because consistency is much
more important.

> Why can't the user expand his macros before passing them in?

Sure he can.  This is the workaround for the fact that we apply
AS_ESCAPE before expansion.

> +at_help_all="AS_ESCAPE(m4_dquote(AT_help_all))"])])dnl

This code has a problem.  It first expands AT_help_all, which
includes all the descriptions of tests, and then runs the expanded
version through AS_ESCAPE.  But unfortunately m4_dquote deletes all
spaces after commas when collecting its parameters.

Run the following
        tests/testsuite -l|grep ","
to see the problem.

The fix is to do



The other two occurence of AS_ESCAPE are fine--they escape before
expanding the test description.

> I added a test case for this, and it seems to work fine... unless I'm 
> misunderstanding what's needed.

You should also check that
really leaves `macro_name' unexpanded.

In other words, with this
m4_define([macro_name], [[macro_expanded]])
m4_define([macro_expanded], [macro_overexpanded])

you should get `macro_expanded' on the output.

Would you please modify your patch according the above comments?

Thank you again for your work.

Have a nice day,
Stepan Kasal

reply via email to

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