Hi,
The feature to strip the trailing spaces in a document at save time is indeed useful but this also affects the lines I didn't write in a file. Since I work a lot with patches, modifying one line in a file may lead to a longer patch because of the white space removal. This makes reviewing the patches on public mailing lists more difficult (and the Linux people might reject the patch, unless one does two separate patches, one for trailing spaces stripping and the other being the real modification).
OTOH, trailing spaces are not accepted on the projects I work, though some files still have them.
My solution (this is actually the behaviour of emacs) is to strip the trailing spaces of a single line when newline is inserted.
See the attached patch. If you don't like to always have this behaviour, could you please consider adding a configuration option?
Thanks.