[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] use m4_require to implement AS_REQUIRE
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] use m4_require to implement AS_REQUIRE |
Date: |
Fri, 17 Oct 2008 15:01:59 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
> The point is that text goes into a diversion only when _you are not doing
> argument collection_ - in other words, the macro call must be expanded at
> the outermost level. Any macro that potentially changes the current
> diversion must be quoted, rather than expanded in advance, when handed as
> an argument to another macro; otherwise, the text output while the
> diversion change is in effect doesn't go to the changed diversion, but to
> the argument collection.
Yeah, that's the similar testcase I got:
m4_init
m4_define([FROBIT],
[m4_divert_text([6], [in diversion _m4_divert_diversion])$1])
m4_define([SHOWIT], [$[]1 is $1])
m4_define([TEXT], [FROBIT(text)])
m4_divert_pop([KILL])
m4_divert_push([1000])dnl
SHOWIT([TEXT])
and that's also the reason why the original testcase was failing.
Paolo
- Re: [PATCH] use m4_require to implement AS_REQUIRE, (continued)