m4-commit
[Top][All Lists]
Advanced

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

[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-156


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-156-g025163f
Date: Wed, 24 Feb 2010 23:49:29 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=025163f3e3eedf665c3baf41e49c501a03a87bf4

The branch, branch-1.6 has been updated
       via  025163f3e3eedf665c3baf41e49c501a03a87bf4 (commit)
      from  b555331c97ecc5ff0fc503ead7098261eb2258a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 025163f3e3eedf665c3baf41e49c501a03a87bf4
Author: Eric Blake <address@hidden>
Date:   Wed Feb 24 16:20:45 2010 -0700

    Improve parsing example.
    
    * doc/m4.texinfo (Input processing): Double-quote argument to
    translit, for robustness.
    * THANKS: Update.
    Reported by Chris Penev.
    
    Signed-off-by: Eric Blake <address@hidden>
    (cherry picked from commit b4f66285d8252196e1b4c6acf55eda3c1118e580)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |    8 ++++++++
 THANKS         |    1 +
 doc/m4.texinfo |   15 +++++++++------
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1d44d7c..98869b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-24  Eric Blake  <address@hidden>
+
+       Improve parsing example.
+       * doc/m4.texinfo (Input processing): Double-quote argument to
+       translit, for robustness.
+       * THANKS: Update.
+       Reported by Chris Penev.
+
 2010-01-29  Eric Blake  <address@hidden>
 
        Document upcoming release.
diff --git a/THANKS b/THANKS
index 8ace38c..206d3a2 100644
--- a/THANKS
+++ b/THANKS
@@ -26,6 +26,7 @@ Brendan Kehoe           address@hidden
 Bruno Haible            address@hidden
 Cesar Strauss           address@hidden
 Chris McGuire           address@hidden
+Chris Penev             address@hidden
 Damian Menscher         address@hidden
 Dan Jacobson            address@hidden
 Daniel Richard G.       address@hidden
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 790f3fb..c039e07 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -1387,13 +1387,15 @@ whitespace so that less whitespace is output (which, 
although harmless
 to shell scripts, can be visually unappealing), and fixes the quoting
 issues so that the capitalization occurs when the macro
 @samp{gl_STRING_MODULE_INDICATOR} is invoked, rather then when it is
-defined.
+defined.  It also adds another layer of quoting to the first argument of
address@hidden, to ensure that the output will be rescanned as a string
+rather than a potential uppercase macro name needing further expansion.
 
 @example
 changequote([,])dnl
 define([gl_STRING_MODULE_INDICATOR],
   [dnl comment
-  GNULIB_[]translit([$1], [a-z], [A-Z])=1dnl
+  GNULIB_[]translit([[$1]], [a-z], [A-Z])=1dnl
 ])dnl
   gl_STRING_MODULE_INDICATOR([strcase])
 @result{}    GNULIB_STRCASE=1
@@ -1402,7 +1404,7 @@ define([gl_STRING_MODULE_INDICATOR],
 The parsing of the first line is unchanged.  The second line sees the
 name of the macro to define, then sees the discarded @address@hidden
 and two spaces, as before.  But this time, the next token is
address@hidden address@hidden@ @ GNULIB_[]translit([$1], [a-z],
address@hidden address@hidden@ @ GNULIB_[]translit([[$1]], [a-z],
 [A-Z])address@hidden, which includes nested quotes, followed by
 @samp{)} to end the macro definition and @samp{dnl} to skip the
 newline.  No early expansion of @code{translit} occurs, so the entire
@@ -1419,10 +1421,11 @@ output literally.  The token @samp{[]} is an empty 
string, so it does
 not affect output.  Then the token @samp{translit} is encountered.
 
 This time, the arguments to @code{translit} are parsed as @samp{(},
address@hidden, @samp{,}, @samp{ }, @samp{[a-z]}, @samp{,}, @samp{ },
address@hidden, @samp{,}, @samp{ }, @samp{[a-z]}, @samp{,}, @samp{ },
 @samp{[A-Z]}, and @samp{)}.  The two spaces are discarded, and the
-translit results in the desired result @samp{STRCASE}.  This is
-rescanned, but since it is not a macro name, it is output literally.
+translit results in the desired result @samp{[STRCASE]}.  This is
+rescanned, but since it is a string, the quotes are stripped and the
+only output is a literal @samp{STRCASE}.
 Then the scanner sees @samp{=} and @samp{1}, which are output
 literally, followed by @samp{dnl} which discards the rest of the
 definition of @code{gl_STRING_MODULE_INDICATOR}.  The newline at the


hooks/post-receive
-- 
GNU M4 source repository




reply via email to

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