On 08/16/2014 08:35 AM, Eric Blake wrote:

> 
> existing:
>> define(`_forloop', `$4'`ifelse($1, `$3', `', `define(`$1',
>> incr($1))$0($@)')')

Oops, I think the bug is on YOUR end, for mis-transcribing what is
already in the manual.  The manual actually says:

define(`_forloop',
       `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')')

Note that it uses "`$4`'ifelse...", where you typed "`$4'`ifelse...".
Where the manual uses `', you incorrectly used '` as the separator
between the parameter expansion and the ifelse macro name.

> 
> proposed:
>> define(`_forloop', `$4'``''`ifelse($1, `$3', `', `define(`$1',
>> incr($1))$0($@)')')
> 
> you are merely adding an empty quote to separate $4 from ifelse.  Which
> seems simple enough to do.  I'll turn it into a formal patch soon enough.

Your proposed text matches what the manual already has, but with more
typing.  Remember, m4 does string concatenation, so it is joining the
strings "$4", "`'", and "ifelse...", for the end result of
"$4`'ifelse..." that matches what the manual already has.  No patch
necessary after all.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to