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

Re: [Libvir] removing trailing blanks (and keeping them away)

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.


Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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