[Top][All Lists]

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

Re: more M4sh documentation

From: Stepan Kasal
Subject: Re: more M4sh documentation
Date: Wed, 22 Mar 2006 23:40:33 +0100
User-agent: Mutt/1.4.1i


On Wed, Mar 22, 2006 at 01:30:45PM -0800, Paul Eggert wrote:
> Ralf Wildenhues <address@hidden> writes:

> [...] I've done a more
> careful review this time, and we need at least one more go-round.

thank you Paul, for this.

> > address@hidden AS_LITERAL_IF (@var{expression}, @var{if-literal}, 
> > @var{if-not-literal})
> > address@hidden
> > +If @var{expression} contains shell indirections such as parameter
> > +expansion @samp{$var} or command substitution @samp{`command`}, expand
> > +to @var{if-not-literal}, else expand to @var{if-literal}.
> First, this is backwards (the if- and the if-not).

No, I think Ralf has it right.

> Second, it doesn't explain things precisely.  Better would be:
>    If @var{expression} might contain shell indirections such as parameter
>    expansion @samp{$var} or command substitution @samp{`command`}, expand
>    to @var{if-literal}.  If it cannot possibly contain these constructs,
>    expand to @var{if-literal}.

Actually, you have `if-literal' twice.  :-)

Your formulation is not exact either.  In my eyes, the string '$' cannot contain
indirection, so it's an imperfectness of AS_LITERAL_IF.

> > The macro
> > +only approximates the answer, as some literals will not be recognized as
> > +such.

Actually, I prefer Ralf's wording; the macro is an approximation, with a skew
to one side.  But it usually doesn't mind if certain literals are treated as if
they were not literals.

Have a nice day,

reply via email to

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