[Top][All Lists]

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

Re: [RFC] improve autotest syntax checks

From: Eric Blake
Subject: Re: [RFC] improve autotest syntax checks
Date: Tue, 11 Mar 2008 19:07:18 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080213 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ralf Wildenhues on 3/11/2008 2:28 PM:
| "Helper macro for m4_wrap and m4_wrap_lifo.  It allows to nest calls
| to m4_wrap within wrapped text."
| Should this feature (the nesting) be documented in the manual?

Applied, with the following mention in the manual (and the testsuite
augmented to test nested m4_wrap):

| Unlike the @acronym{GNU} M4 builtin, these macros only recognize one
| argument, and avoid token pasting between consecutive invocations.  On
| the other hand, nested calls to @code{m4_wrap} from within wrapped text
| work just as in the builtin.

Although on reflection, this is a slight mis-statement, because:

m4_builtin([m4wrap], [m4_define([foo],[$1])foo([bar])])

behaves differently than


The problem is that m4wrap stores the $1 literally, leaving it for the
definition of foo, but _m4_wrap_text is m4_define'd to contain a $1 then
expanded later, meaning the $1 is expanded as an (empty) argument and foo
is defined to the empty string.  However, the M4 manual suffers from the
same bug, so I'll have to think of a way to patch it later and fix it in
both projects.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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