[MPlayer-dev-eng] [RFC] Removing all trailing whitespace
Chris Zubrzycki
chris at middle--earth.org
Wed Aug 23 06:43:56 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Aug 21, 2006, at 8:50 AM, Rich Felker wrote:
> On Mon, Aug 21, 2006 at 11:26:59AM +0200, Diego Biurrun wrote:
>> On Sun, Aug 20, 2006 at 08:41:23PM -0400, Rich Felker wrote:
>>> On Mon, Aug 21, 2006 at 02:38:48AM +0300, Ivan Kalvachev wrote:
>>>> I'm also wondering about converting tabs to spaces (only .h
>>>> and .c files ;)
>>>
>>> I have no objection to doing this to files where tabs have been
>>> mixed
>>> with spaces, but I strongly object to applying this to properly-
>>> tabbed
>>> files. Files which use tabs correctly are much better with tabs.
>>>
>>> Also note that the following (where _________ indicates a tab) does
>>> not count as mixed tabs/spaces:
>>>
>>> ________foo = 1 + bar(...
>>> ________ ...
>>> ________ );
>>>
>>> but the following does:
>>>
>>> ________foo = 1 + bar(...
>>> ________________ ...
>>> ________________ );
>>>
>>> (The difference is that the former uses tabs as indention levels and
>>> spaces for character-level alignment, while the latter mixes tabs
>>> and
>>> spaces for character-level alignment assuming a tab is 8 spaces. The
>>> former is very good style while the latter is an abomination!)
>>
>> It's surely a scenario that breaks when using different tab
>> widths, but
>> I'd say it's just something that would have worked well if there had
>> only been spaces in the first place ;-p
>
> Spaces only DO NOT WORK WELL because it's very difficult to count
> them, add/delete whole indention levels, etc. without a special
> editor. Tabs just plain work.
>
>> It's also very hard to keep this style consistent, once several
>> people
>> start editing and the code gets changed somebody will be less careful
>> and mess it up for sure...
>
> How? The only way it becomes inconsistent is if a person uses a broken
> editor that munges tabs/spaces, like emacs in the default config...
For fink we specify the tab stops and indent widths in each file, for
emacs and vim. It helps a lot:
# -*- mode: Perl; tab-with: 4; -*-
# vim: ts=4 sw=4 noet
- -chris zubrzycki
- - --
PGP public key: http://homepage.mac.com/beren/publickey.txt
ID: 0xA2ABC070 Fprint: 26B0 BA6B A409 FA83 42B3 1688 FBF9 8232 A2AB
C070
========================================================
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Please sign reply-http://www.gnupg.org
iEYEARECAAYFAkTr3Q8ACgkQ+/mCMqKrwHCVAQCg5gYFHmWM5sS0cA9GVEOM3oIJ
mr4An1SR8949yggQFFrdiF+VvYNhY8o3
=Y9kG
-----END PGP SIGNATURE-----
More information about the MPlayer-dev-eng
mailing list