]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
FIXMEs about quadrigraphs in help text.
authorStepan Kasal <kasal@ucw.cz>
Fri, 22 Apr 2005 06:37:24 +0000 (06:37 +0000)
committerStepan Kasal <kasal@ucw.cz>
Fri, 22 Apr 2005 06:37:24 +0000 (06:37 +0000)
ChangeLog
doc/autoconf.texi
lib/m4sugar/m4sh.m4
lib/m4sugar/m4sugar.m4

index 27b6a9dee04c7001b51fbbf08526616b05206cf3..c9b8c4a8b0c84f7f4b5de76c560623315fed8e23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-04-22  Stepan Kasal  <kasal@ucw.cz>
+
+       * doc/autoconf.texi (External Software): Quadrigraphs are not
+         processed correctly in AS_HELP_STRING; avoid this in the examples.
+       * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Add a FIXME about quadrigraphs.
+       * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Likewise; and rephrase the
+         comment and reduce m4_default([foo], []) to [foo].
+       (m4_strip): Update the explanation.
+
 2005-04-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/autoconf/general.m4 (_AC_INIT_PREPARE, _AC_RUN_IFELSE):
index 3d7a66e6c451b1d405f629e841e8487446b3b6b6..4ab708bf8913c4d1ada9ae594c9a5a7195c6273c 100644 (file)
@@ -13347,7 +13347,7 @@ experimental and not well tested, and is therefore disabled by default.
 @example
 AC_ARG_WITH(readline,
   [AS_HELP_STRING(--with-readline,
-    [enable experimental support for readline @@<:@@default=disabled@@:>@@])],
+    [enable experimental support for readline])],
   [],
   with_readline=no)
 
@@ -13369,7 +13369,7 @@ an important feature and that it should be enabled by default.
 @example
 AC_ARG_WITH(readline,
   [AS_HELP_STRING(--without-readline,
-    [disable support for readline @@<:@@default=enabled@@:>@@])],
+    [disable support for readline])],
   [],
   with_readline=yes)
 
index 7feeabf49e87b19f2eeffe6b9941221cda450fcb..1ee12e44f082682f9d27ac3a82643379a6f0faba 100644 (file)
@@ -1058,6 +1058,18 @@ _AS_PATH_WALK([$PATH], [echo "PATH: $as_dir"])
 #  | column 2                |
 #  column 0                  column 26
 #
+#
+# FIXME: Handle quadrigraphs in LHS correctly.
+# another one:
+# FIXME: the m4_text_wrap interface design seems to be wrong.  I see two ways:
+# 1) m4_text_wrap could pad the FIRST_PREFIX to the length of PREFIX; then
+#    there would be no need to handle quadrigraphs in AS_HELP_STRING.
+# 2) The special case when FIRST_PREFIX is longer than PREFIX could be moved
+#    from m4_text_wrap here; then one could call
+#      m4_text_wrap(TEXT, [], [    ])
+#    to get an indented paragraph.
+# My first impression is that 2) is better.  --kasal 19apr05
+#
 m4_define([AS_HELP_STRING],
 [m4_pushdef([AS_Prefix], m4_default([$3], [                          ]))dnl
 m4_pushdef([AS_Prefix_Format],
index e621dd8e1a9896e0ba4b00aa834d02cb37b99358..05dd6411a1c449e690e3419bf46ea25b63d0f49f 100644 (file)
@@ -1416,10 +1416,7 @@ m4_define([m4_flatten],
 #    m4_strip([  active                active ])end
 #    => active activeend
 #
-# This macro is fun!  Because we want to preserve active symbols, STRING
-# must be quoted for each evaluation, which explains there are 4 levels
-# of brackets around $1 (don't forget that the result must be quoted
-# too, hence one more quoting than applications).
+# Because we want to preserve active symbols, STRING must be double-quoted.
 #
 # Then notice the 2 last patterns: they are in charge of removing the
 # leading/trailing spaces.  Why not just `[^ ]'?  Because they are
@@ -1511,10 +1508,10 @@ m4_define([m4_append_uniq],
 # m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH])
 # -------------------------------------------------------
 # Expands into STRING wrapped to hold in WIDTH columns (default = 79).
-# If prefix is set, each line is prefixed with it.  If FIRST-PREFIX is
-# specified, then the first line is prefixed with it.  As a special
-# case, if the length of the first prefix is greater than that of
-# PREFIX, then FIRST-PREFIX will be left alone on the first line.
+# If PREFIX is given, each line is prefixed with it.  If FIRST-PREFIX is
+# specified, then the first line is prefixed with it.  As a special case,
+# if the length of FIRST-PREFIX is greater than that of PREFIX, then
+# FIRST-PREFIX will be left alone on the first line.
 #
 # Typical outputs are:
 #
@@ -1541,12 +1538,15 @@ m4_define([m4_append_uniq],
 # we really want to bother with people trying each single corner
 # of a software?
 #
+# more important:
+# FIXME: handle quadrigraphs correctly, both in TEXT and in FIRST_PREFIX.
+#
 # This macro does not leave a trailing space behind the last word,
 # what complicates it a bit.  The algorithm is stupid simple: all the
 # words are preceded by m4_Separator which is defined to empty for the
 # first word, and then ` ' (single space) for all the others.
 m4_define([m4_text_wrap],
-[m4_pushdef([m4_Prefix], m4_default([$2], []))dnl
+[m4_pushdef([m4_Prefix], [$2])dnl
 m4_pushdef([m4_Prefix1], m4_default([$3], [m4_Prefix]))dnl
 m4_pushdef([m4_Width], m4_default([$4], 79))dnl
 m4_pushdef([m4_Cursor], m4_len(m4_Prefix1))dnl