m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/doc/m4.texinfo,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/doc/m4.texinfo,v [branch-1_4]
Date: Fri, 10 Aug 2007 13:01:23 +0000

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
address@hidden 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
address@hidden 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
address@hidden together results in nested quoting.
 
 @example
 define(`l', `<[>')define(`r', `<]>')
@@ -2128,11 +2127,6 @@
 @result{})
 defn([l], [r])
 @result{}<[>][<]>
-define([a], [A])
address@hidden
-defn([a], [defn], [a])
address@hidden:stdin:7: Warning: cannot concatenate builtin `defn'
address@hidden
 @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.
+
address@hidden
+define(`a', `A')
address@hidden
+defn(`a', `defn', `a')
address@hidden:stdin:2: Warning: cannot concatenate builtin `defn'
address@hidden
address@hidden example
+
 @node Pushdef
 @section Temporarily redefining macros
 




reply via email to

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