[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:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
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
m4_wrap([m4_define([foo],[$1])foo([bar])])
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkfXLMYACgkQ84KuGfSFAYAYxwCeMJLdh81MBJtNXaknHqzaFcsw
J+0AoNQjPjeTqtGVbOUE1l7i8ZqhIxCv
=v+t4
-----END PGP SIGNATURE-----