CVSROOT: /sources/m4
Module name: m4
Branch: branch-1_4
Changes by: Eric Blake <ericb> 07/08/10 13:01:22
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.1.1.1.2.133
retrieving revision 1.1.1.1.2.134
diff -u -b -r1.1.1.1.2.133 -r1.1.1.1.2.134
--- doc/m4.texinfo 9 Aug 2007 13:39:09 -0000 1.1.1.1.2.133
+++ doc/m4.texinfo 10 Aug 2007 13:01:22 -0000 1.1.1.1.2.134
@@ -2110,12 +2110,11 @@
On the other hand, it is possible to exploit the fact that @code{defn}
can concatenate multiple macros prior to the rescanning phase, in order
to join the definitions of macros that, in isolation, have unbalanced
-quotes. In the example below, note how the use of @code{defn} on
[EMAIL PROTECTED] in isolation opens a string, which is not closed until the
next
-line; but used on @code{l} and @code{r} together results in nested
-quoting. Also note that @code{defn} with multiple arguments can only
-join text macros, not builtins, although a future version of
[EMAIL PROTECTED] M4 may lift this restriction.
+quotes. This is particularly useful when one has used several macros to
+accumulate text that M4 should rescan as a whole. In the example below,
+note how the use of @code{defn} on @code{l} in isolation opens a string,
+which is not closed until the next line; but used on @code{l} and
[EMAIL PROTECTED] together results in nested quoting.
@example
define(`l', `<[>')define(`r', `<]>')
@@ -2128,11 +2127,6 @@
@result{})
defn([l], [r])
@result{}<[>][<]>
-define([a], [A])
[EMAIL PROTECTED]
-defn([a], [defn], [a])
[EMAIL PROTECTED]:stdin:7: Warning: cannot concatenate builtin `defn'
[EMAIL PROTECTED]
@end example
@cindex builtins, special tokens
@@ -2151,6 +2145,18 @@
@result{}0
@end example
+Also note that @code{defn} with multiple arguments can only join text
+macros, not builtins, although a future version of @acronym{GNU} M4 may
+lift this restriction.
+
[EMAIL PROTECTED]
+define(`a', `A')
[EMAIL PROTECTED]
+defn(`a', `defn', `a')
[EMAIL PROTECTED]:stdin:2: Warning: cannot concatenate builtin `defn'
[EMAIL PROTECTED]
[EMAIL PROTECTED] example
+
@node Pushdef
@section Temporarily redefining macros