summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-02-17 07:13:51 -0700
committerEric Blake <ebb9@byu.net>2009-02-17 07:13:51 -0700
commit10fb79cb4f4a4cb6a174d628c3304fee61596ff8 (patch)
treec34c3106d7e09a4bda475c481d1c2b6fece5fba7
parent047d480cdc9ff71e4e3228017ca24a83737cbf1f (diff)
downloadm4-10fb79cb4f4a4cb6a174d628c3304fee61596ff8.tar.gz
Sync changecom documentation with branch.
* doc/m4.texinfo (Changecom): Tweak wording. * NEWS: Import changes from the branch. Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r--ChangeLog4
-rw-r--r--NEWS8
-rw-r--r--doc/m4.texinfo19
3 files changed, 18 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index ad5e8a45..b5f01a29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2009-02-17 Eric Blake <ebb9@byu.net>
+ Sync changecom documentation with branch.
+ * doc/m4.texinfo (Changecom): Tweak wording.
+ * NEWS: Import changes from the branch.
+
Stage 29b: Process quotes and comments by buffer, not bytes.
Search for quote and comment delimiters by buffer when possible.
Memory impact: none.
diff --git a/NEWS b/NEWS
index 1f25484e..55abe349 100644
--- a/NEWS
+++ b/NEWS
@@ -135,10 +135,6 @@ promoted to 2.0.
efficient mapping directly to a builtin function, rather than through
textual indirection through further expansions of `builtin'.
-*** The `changecom' builtin semantics now match traditional
- implementations; if the start-comment string resembles a macro name or
- the start-quote string, comments are effectively disabled.
-
*** The `changesyntax' builtin has been improved, to make it easier to add
and remove characters from a syntax class without having to specify the
entire set of characters in that class. It also supports new syntax
@@ -240,6 +236,10 @@ promoted to 2.0.
then apply this patch:
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=56d42fa71
+** The `changecom' builtin semantics now match traditional
+ implementations; if the start-comment string resembles a macro name or
+ the start-quote string, comments are effectively disabled.
+
** The `divert' builtin now accepts an optional second argument of text
that is immediately placed in the new diversion, regardless of whether
the current expansion is nested within argument collection of another
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 5c098388..815591d7 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -5135,7 +5135,7 @@ But: /* this is a comment now */ while this is not a comment
@cindex comments, copied to output
Note how comments are copied to the output, much as if they were quoted
strings. If you want the text inside a comment expanded, quote the
-start comment delimiter.
+begin-comment delimiter.
Calling @code{changecom} without any arguments, or with @var{start} as
the empty string, will effectively disable the commenting mechanism. To
@@ -5164,14 +5164,15 @@ If no single character is appropriate, @var{start} and @var{end} can be
of any length. Other implementations cap the delimiter length to five
characters, but @acronym{GNU} has no inherent limit.
-Macros and quotes are recognized in preference to comments, so if a
-prefix of @var{start} can be recognized as part of a potential macro
-name, or confused with a quoted string, the comment mechanism is
-effectively disabled. Unless you use @code{changesyntax}
-(@pxref{Changesyntax}), this means that @var{start} should not begin
-with a letter, digit, or @samp{_} (underscore), and that neither the
-start-quote nor the start-comment string should be a prefix of the
-other.
+As of M4 1.6, macros and quotes are recognized in preference to
+comments, so if a prefix of @var{start} can be recognized as part of a
+potential macro name, or confused with a quoted string, the comment
+mechanism is effectively disabled (earlier versions of @acronym{GNU} M4
+favored comments, but this was inconsistent with other implementations).
+Unless you use @code{changesyntax} (@pxref{Changesyntax}), this means
+that @var{start} should not begin with a letter, digit, 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')