[Top][All Lists]

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

Re: gratuitous changes

From: Martin Stjernholm
Subject: Re: gratuitous changes
Date: 02 Feb 2003 00:28:21 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Richard Stallman <address@hidden> wrote:

>     But I still think that what happened with keyboard.c is bad:
>     turning every whitespace-only line into an empty line.
> I see what you mean.  At the same time, it is tidier
> not to have those excess spaces; we don't want to treat
> them as sacred.

I don't know why this got cc'd to the CC Mode address, but I have
something to say on the subject of spurious whitespaces anyway:

The matter of whitespace handling is a personal preference, be it
handling on whitespace on empty lines, other trailing whitespace, or
indent-tabs-mode. While everyone should use whatever settings they
like, it becomes a problem when someone applies his/her preference
over a whole file in a shared development environment, as this thread
has shown.

To address that, I developed the package ws-trim.el. What's special
about it is that it normally only trims whitespace on lines which are
changed through other editing. In my experience this works well; the
code edited by oneself gets the whitespace trimming one likes, while
other code in the same file isn't affected so cvs differences seldom
become unnecessarily large.

The trimming is done whenever the point leaves a line that has been
changed. Editing that affects more than one line, e.g. pasting of
blocks, is normally not affected.

I'm willing to contribute this package if there's interest. (I said
that when I announced it back in -97 too, but RMS thought at that
point that the all-or-nothing approach in whitespace.el was

reply via email to

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