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

Richard W.M. Jones rjones at redhat.com
Mon Feb 4 18:42:01 UTC 2008


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.

Rich.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080204/a02d8870/attachment-0001.bin>


More information about the libvir-list mailing list