On Nov 3, 2007, at 2:33 PM, Diederik van Lierop wrote:

After my commit of today, Johan Engelen pointed out that there were 

quite some tabstops being used in it instead of spaces. I started an 

automated find & replace, replacing all tabs with four spaces in just 

that commit. Worked like a charm.


I also found tens of thousands of tabs when searching just *.h in /src. 

Now I wonder: should we do a massive search & replace on the full code 

base? I've tried and it compiles nicely. It also doesn't mess up the 

indenting, at least not in the places I've looked at. Is it worth it? Or 

will it give to much troubles in the end afterall?


I've seen a few places where just converting to four spaces will not get the right formatting, so it could be slightly more complex than that.

Trailing whitespace, on the other hand, is safe to purge. Emacs even has a command that does it.  :-)

One factor is if things with tabs are properly indented already or not. Another one is edge cases, like when parameters to a function are spread onto more than a single line.

Also, you should check if any of the files in question are missing the formatting footer we've been adding. That's something to put in as a first step.

Once you look to change something you could do is run the files through emacs' indent-region and compare the result to your space-replaced ones. If there is any difference, then those could be marked for later review.