+2008-04-24 Eric Blake <ebb9@byu.net>
+
+ Mention m4sugar's internal quote strings.
+ * doc/autoconf.texi (Quadrigraphs): Mention alternate quote used
+ in m4sugar, and how to still output it literally.
+ * tests/m4sugar.at (m4@&t@_split): And test it.
+ Reported by Joel E. Denny.
+
2008-04-23 Eric Blake <ebb9@byu.net>
Allow unbalanced () in m4_expand.
This expression contains unbalanced brackets so it cannot be put easily
into an M4 macro.
-You can work around this problem by using one of the following
+Additionally, there are a few m4sugar macros (such as @code{m4_split}
+and @code{m4_expand}) which internally use special markers in addition
+to the regular quoting characters. If the arguments to these macros
+contain the literal strings @samp{-=<@{(} or @samp{)@}>=-}, the macros
+might behave incorrectly.
+
+You can work around these problems by using one of the following
@dfn{quadrigraphs}:
@table @samp
Trailing spaces are smashed by @command{autom4te}. This is a feature.
-@item to produce other quadrigraphs
+@item to produce quadrigraphs and other strings reserved by m4sugar
+
+For instance @samp{@@<@@&t@@:@@} produces @samp{@@<:@@}. For a more
+contrived example:
-For instance @samp{@@<@@&t@@:@@} produces @samp{@@<:@@}.
+@example
+m4_define([a], [A])m4_define([b], [B])m4_define([c], [C])dnl
+m4_split([a )@}>=- b -=<@{( c])
+@result{}[a], [], [B], [], [c]
+m4_split([a )@}@@&t@@>=- b -=<@@&t@@@{( c])
+@result{}[a], [)@}>=-], [b], [-=<@{(], [c]
+@end example
@item to escape @emph{occurrences} of forbidden patterns
m4_split([abcde], [[bd]])
m4_split([foo=`` bar=''])
m4_split([foo='' bar=``])
+dnl these next two are from the manual; keep this in sync if the internal
+dnl quoting strings in m4_split are changed
+m4_define([a], [A])m4_define([b], [B])m4_define([c], [C])dnl
+m4_split([a )}>=- b -=<{( c])
+m4_split([a )}@&t@>=- b -=<@&t@{( c])
]],
[[
[a], [c], [e]
[foo=``], [bar='']
[foo=''], [bar=``]
+[a], [], [B], [], [c]
+[a], [)}>=-], [b], [-=<{(], [c]
]])
AT_CLEANUP