Hello, I attach the suggestion of autoconf m4sugar-related documentation improvement. Specifically, the patch adds a more concrete description of what the m4_pattern_forbid thingy that pretends it is a macro accepts as an argument. BR, Matej
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d9e833d..3d3a24b 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13379,6 +13379,15 @@ the authors of this documentation: input, such as macros, should be
documented by @samp{dnl} comments; reserving @samp{#}-comments to
document the output).
+The regular expression family the output is checked against is a Perl one.
+Therefore, if you define your own macros that begin with @samp{M_} and
+are composed from capital letters and underscores,
+you want to specify @code{m4_pattern_forbid([^M_[A-Z_]+])}
+Although @samp{^} is a Perl regexp for beginning of lines, due to the
+output post-processing performed by @command{autom4te}, it will have
+the same effect as the regular expression @samp{\b},
+that matches beginning of words.
+
As an example of a common use of this macro, consider what happens in
packages that want to use the @command{pkg-config} script via the
third-party @code{PKG_CHECK_MODULES} macro. By default, if a developer
@@ -13386,7 +13395,7 @@ checks out the development tree but has not yet installed the pkg-config
macros locally, they can manage to successfully run @command{autoconf}
on the package, but the resulting @file{configure} file will likely
result in a confusing shell message about a syntax error on the line
-mentioning the unexpanded PKG_CHECK_MODULES macro. On the other hand,
+mentioning the unexpanded @code{PKG_CHECK_MODULES} macro. On the other hand,
if @file{configure.ac} includes @code{m4_pattern_forbid([^PKG_])}, the
missing pkg-config macros will be detected immediately without allowing
@command{autoconf} to succeed.
signature.asc
Description: This is a digitally signed message part
