autoconf-patches
[Top][All Lists]
Advanced

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

Re: more m4sugar documentation


From: Eric Blake
Subject: Re: more m4sugar documentation
Date: Thu, 18 Oct 2007 16:25:37 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Benoit SIGOURE <tsuna <at> lrde.epita.fr> writes:

> > address@hidden m4_strip (@var{string})
> > address@hidden
> > +Strip whitespace from @var{string}.  Sequences of space and tab are
> 
> s/whitespace/&s/

According to http://dictionary.reference.com/browse/whitespace, "whitespace" 
already represents a sequence of characters.  No need to add an 's'.

> > address@hidden m4_text_wrap (@var{string}, @ovar{prefix}, @
> > +  @dvar{prefix1, @var{prefix}}, @dvar{width, 79})
> > address@hidden
> > +Break @var{string} into a series of whitespace-separated words, then
> > +format those words to wrap within @var{width} columns, and without
> > +trailing whitespace.  If given, @var{prefix1} is prepended to the  
> > first
> > +line, and @var{prefix} is prepended to each continuation line.  As a
> > +special case, if @var{prefix1} is longer than @var{prefix}, the first
> > +line will consist solely of @var{prefix1}.
> > +
> > +For some examples:
> 
> Sounds weird to me (I'm not a native speaker so I don't know whether  
> this is correct).

Is this any better?

Break <string> into a series of whitespace-separated words, then output those 
words separated by spaces, and wrapping lines any time output would exceed 
<width> columns.  If given, <prefix1> begins the first line, and <prefix> 
begins all wrapped lines.  If <prefix1> is longer than <prefix>, then the first 
line consists of just <prefix1>.  If <prefix> is longer than <prefix1>, padding 
is inserted so that the first word of <string> begins at the same indentation 
as all wrapped lines.

If you like that wording, or have improvements, I'll apply a patch.

(Hmm, if <string1> is longer than <string>, and it contains trailing 
whitespace, then that trailing whitespace is currently output by m4.  At least 
autom4te compensates for this by squashing trailing whitespace before the final 
product.)

-- 
Eric Blake






reply via email to

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