[Top][All Lists]

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

Re: regression: filling comments in C++ code (today's CVS)

From: Martin Stjernholm
Subject: Re: regression: filling comments in C++ code (today's CVS)
Date: 28 Feb 2003 15:39:58 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

"Stefan Monnier" <monnier+gnu/address@hidden> wrote:

> > I mean the following near the start of fill-region-as-paragraph:
> > 
> >   ;; Ignore blank lines at beginning of region.
> >   (skip-chars-forward " \t\n")
> > 
> > To me it seems more natural if this function compacted all whitespace
> > the same way, even that at the start.
> Since the function should basically never be called on any empty line
> at all /.../

That provision isn't obvious to me. The doc says "it removes any
paragraph breaks in the region/.../". I interpret "paragraph breaks"
to include empty lines in the region, at the start as much as anywhere

> Could you describe in which context you bumped into it ?

I only bumped into it because I took a quick look at the function, and
it looked like something that could surprise programmers that embed
fill-region-as-paragraph and thus cause their code to misbehave in
some odd situation down the road. According to the principle of least
surprising behavior one should ask for specific reasons to have a
special case rather than reasons for not having it.

The only reason I can see to have this particular one is that it's
already there and has been for some time. Perhaps that's a good enough
cause to keep it.

reply via email to

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