]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(Limitations of Usual Tools): Warn about sed stripping
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 Jul 2006 19:55:45 +0000 (19:55 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 24 Jul 2006 19:55:45 +0000 (19:55 +0000)
leading white space from text.

ChangeLog
doc/autoconf.texi

index 4e652b7b7b960ca47b87a25cdea707f64a2a2f56..942220a54826042dbd96fdf11a50d6c07a7a7eef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
        * doc/autoconf.texi (Volatile Objects): Be even a little
        less skeptical about "volatile", after discussion with
        Bruno Haible on bug-gnulib.
+       (Limitations of Usual Tools): Warn about sed stripping
+       leading white space from text.  From Bruno Haible.
 
 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
 
index 5f7ea204530fe3da1c9f65e790e4667a930766d4..8dda7d12b467323451f8b1d6d7e3e3c2d07388c8 100644 (file)
@@ -9838,7 +9838,7 @@ m4_foreach([myvar], [[foo], [bar, baz]],
 
 @defmac m4_foreach_w (@var{var}, @var{list}, @var{expression})
 @msindex{foreach_w}
-Loop over the whitespace-separated list @var{list}, assigning each value
+Loop over the white-space-separated list @var{list}, assigning each value
 to @var{var}, and expand @var{expression}.
 
 The deprecated macro @code{AC_FOREACH} is an alias of
@@ -13671,6 +13671,23 @@ Also note that Posix requires that the @samp{b}, @samp{t}, @samp{r}, and
 On the other hand, no white space is allowed between @samp{:} and the
 subsequent label name.
 
+Some @command{sed} implementations (e.g., MacOS X 10.4, Solaris 10
+@command{/usr/ucb/sed}) strip leading white space from the text of
+@samp{a}, @samp{c}, and @samp{i} commands.  Prepend a backslash to
+work around this incompatibility with Posix:
+
+@example
+$ @kbd{echo flushleft | sed -e 'a\}
+@kbd{   indented'}
+flushleft
+indented
+$ @kbd{echo foo | sed -e 'a\}
+@kbd{\   indented'}
+flushleft
+   indented
+@end example
+
+
 @item @command{sed} (@samp{t})
 @c ---------------------------
 @prindex @command{sed} (@samp{t})