CVSROOT: /sources/m4
Module name: m4
Branch: branch-1_4
Changes by: Eric Blake <ericb> 06/08/03 13:31:40
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.1.1.1.2.59
retrieving revision 1.1.1.1.2.60
diff -u -b -r1.1.1.1.2.59 -r1.1.1.1.2.60
--- doc/m4.texinfo 1 Aug 2006 13:05:45 -0000 1.1.1.1.2.59
+++ doc/m4.texinfo 3 Aug 2006 13:31:40 -0000 1.1.1.1.2.60
@@ -2420,6 +2420,37 @@
@result{} hi HI
@end example
+Quotes are recognized in preference to argument collection. In
+particular, if @var{start} is a single @samp{(}, then argument
+collection is effectively disabled. For portability with other
+implementations, it is a good idea to avoid @samp{(}, @samp{,}, and
[EMAIL PROTECTED])} as the first character in @var{start}.
+
[EMAIL PROTECTED]
+define(`echo', `$#:$@:')
[EMAIL PROTECTED]
+define(`hi', `HI')
[EMAIL PROTECTED]
+changequote(`(',`)')
[EMAIL PROTECTED]
+echo(hi)
[EMAIL PROTECTED]::hi
+changequote
[EMAIL PROTECTED]
+changequote(`((', `))')
[EMAIL PROTECTED]
+echo(hi)
[EMAIL PROTECTED]:HI:
+echo((hi))
[EMAIL PROTECTED]::hi
+changequote
[EMAIL PROTECTED]
+changequote(`,', `)')
[EMAIL PROTECTED]
+echo(hi,hi)bye)
[EMAIL PROTECTED]:HIhibye:
[EMAIL PROTECTED] example
+
If @var{end} is a prefix of @var{start}, the end-quote will be
recognized in preference to a nested begin-quote. In particular,
changing the quotes to have the same string for @var{start} and
@@ -2529,10 +2560,11 @@
@end ignore
Comments are recognized in preference to macros. However, this is not
-compatible with other implementations, where macros take precedence over
-comments, so it may change in a future release. For portability, this
-means that @var{start} should not begin with a letter or @samp{_}
-(underscore).
+compatible with other implementations, where macros and even quoting
+takes precedence over comments, so it may change in a future release.
+For portability, this means that @var{start} should not begin with a
+letter or @samp{_} (underscore), and that neither the start-quote nor
+the start-comment string should be a prefix of the other.
@example
define(`hi', `HI')
@@ -2543,6 +2575,35 @@
@result{}q hi Q HI
@end example
+Comments are recognized in preference to argument collection. In
+particular, if @var{start} is a single @samp{(}, then argument
+collection is effectively disabled. For portability with other
+implementations, it is a good idea to avoid @samp{(}, @samp{,}, and
[EMAIL PROTECTED])} as the first character in @var{start}.
+
[EMAIL PROTECTED]
+define(`echo', `$#:$@:')
[EMAIL PROTECTED]
+define(`hi', `HI')
[EMAIL PROTECTED]
+changecom(`(',`)')
[EMAIL PROTECTED]
+echo(hi)
[EMAIL PROTECTED]::(hi)
+changecom
[EMAIL PROTECTED]
+changecom(`((', `))')
[EMAIL PROTECTED]
+echo(hi)
[EMAIL PROTECTED]:HI:
+echo((hi))
[EMAIL PROTECTED]::((hi))
+changecom(`,', `)')
[EMAIL PROTECTED]
+echo(hi,hi)bye)
[EMAIL PROTECTED]:HI,hi)bye:
[EMAIL PROTECTED] example
+
It is an error if the end of file occurs within a comment.
@example