
On Mon, Feb 04, 2008 at 06:42:01PM +0000, Richard W.M. Jones wrote:
Jim Meyering wrote:
Any objection to a mass removal of trailing blanks?
[ If you haven't yet been adversely affected by e.g., pointless conflicts due solely to differences in white space, count yourself lucky, and chalk it up to not having to deal with many branches. The sooner we do this the better, IME. ]
I'm proposing two things: - remove all trailing blanks - add a "make syntax-check" check to ensure that no new ones are added
Yup, no problems with such a patch.
Interestingly emacs perl-mode highlights trailing spaces.
I looked into it, and there is a show-trailing-whitespace variable in emacs, so one might consider modifying our "standard" trailer to be:
/* * Local variables: * indent-tabs-mode: nil * c-indent-level: 4 * c-basic-offset: 4 * tab-width: 4 * show-trailing-whitespace: t <--- NB * End: */
HOWEVER this doesn't work, or at least not automatically. Emacs complains: "The local variables list in foo.c contains values that may not be safe" and marks show-trailing-whitespace as one such variable. Although one can mark it as safe in your local preferences, every emacs user would have to do this.
I've no idea why show-trailing-whitespace should be unsafe.
Hmm, I've got the following in my $HOME/.emacsrc file (require 'show-wspace) (add-hook 'font-lock-mode-hook 'highlight-trailing-whitespace) Which does the trick for me Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|