The quoting documentation has this example:

  define(`x', `substr(ab')
  define(`y', `cde, `1', `3')')
  x`'y => bcd

And it says that it behaves as substr(`abcde', `1', `3'); this is not exact because `ab' and `cde' are active:

  define(`ab', `AB')
  define(`cde', `CDE')
  define(`x', `substr(ab')
  define(`y', `cde, `1', `3')')
  x`'y => BCD

Therefore, the first parameter of substr behaves as ab`'cde, not `abcde'. I attach a simple patch to fix this.

Paolo

2007-12-13  Paolo Bonzini  <[EMAIL PROTECTED]> (tiny change)
            Giovanni Toffetti  <[EMAIL PROTECTED]>

        * doc/m4.texinfo: Fix quoting of a quoting example.


diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 14017d8..f57402b 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -1509,7 +1509,7 @@ empty string.
 @cindex rescanning
 The output of macro evaluations is always rescanned.  The following
 example would yield the string @samp{bcd}, exactly as if @code{m4}
-has been given @[EMAIL PROTECTED](`abcde', `1', `3')}} as input:
+has been given @[EMAIL PROTECTED](ab`'cde, `1', `3')}} as input:

 @example
 define(`x', `substr(ab')


_______________________________________________
M4-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-patches

Reply via email to