Re: Source indentation style - take II

Subject: Re: Source indentation style - take II
From: Jesper Skov (
Date: Sat Feb 17 2001 - 03:06:56 CST

>>>>> "Paul" == Paul Rohr <> writes:

Paul> I agree that there's some jumbling to be fixed, but the
Paul> prettified code variants I've seen from you so far don't match
Paul> any of the clean code in the trees, either. I dislike the idea
Paul> of tools reformatting good code, too.

OK, I won't spend time on it then.

Paul> There *was* a very consistent "house style" that Jeff, Eric, and
Paul> I used when originally writing the product. We've been working
Paul> together on and off in various combinations since the early 90s.
Paul> Thus, when you're reading any file touched only by the 3 of us,
Paul> you have to key off some pretty subtle stylistic cues to
Paul> distinguish which lines got written by whom. (In fact, most
Paul> changes to Eric's files look like he wrote them, etc.)

I just tried on pp_AttrProp.cpp which has only been edited by
abisource people. It results in changes like these (which cannot be

Warranted IMO:

-bool PP_AttrProp::setAttributes(const XML_Char ** attributes)
+bool PP_AttrProp::setAttributes(const XML_Char ** attributes)
- if (!setAttribute(pName,pValue))
+ if (!setAttribute(pName, pValue))


- const XML_Char ** pp = attributes;
+ const XML_Char **pp = attributes;

Mixed feelings:

- for (UT_uint32 k=0; k+1<kLimit; k+=2)
+ for (UT_uint32 k = 0; k + 1 < kLimit; k += 2)

And it's clear screen width should be 130+ chars to contain the
comments in existing form.

Paul> Paul motto -- reformatting someone else's code is a great way to
Paul> piss them off motto #2 -- and sometimes that's appropriate ;-)

Agree. But if you look at the current code base you'll see that it's
far from consistent. That makes it very annoying to read - for _me_ -
in _emacs_. I'm sure it doesn't matter much if the editor enforces a
special layout when loading a file - which is how I suspect we came to
have the current mess.

However, my biggest peeve is the bad line indention. I can fix that
without changing anything using the emacs indent function. I will do
that on all files I edit/view in the future. The style guide is pretty
clear on that issue, so I can hardly be blamed for enforcing it. I
just wish I didn't have to do it manually, is all.


This archive was generated by hypermail 2b25 : Sat Feb 17 2001 - 03:07:10 CST