[Top][All Lists]

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

Re: 2.62 AT_SETUP limitations

From: Akim Demaille
Subject: Re: 2.62 AT_SETUP limitations
Date: Thu, 24 Apr 2008 11:20:12 +0200

Le 22 avr. 08 à 14:45, Eric Blake a écrit :
Really, the problem is
that there is no way to determine whether $1 is safe to expand, short of
expanding $1; thus, if it was not safe, you've already screwed up the
state of the m4 parsing.

I always felt m4 lacks an "eval" macro.  Not the one for arithmetics,
but one which would run m4 on its argument, and return the expansion
quoted.  This is what tried to do m4_quote/m4_dquote, but it's fragile.

There are really two sort of macros.  Those which really work on the
text, and you do not want to evaluate the result.  This is where
regexp, patsubst etc. live.  And there are the regular just-expanding

For the latter, a usual single-level of quotation is fine.  For the
former, we need two.  And we have no safe means to go from one model
to the other, between text-hacking macros and text-expanding macros.

Something like a new primitive "eval and return quoted" would fill
the gap.

Well, at least that's what I believed years ago :)

reply via email to

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