Re: Fixing indentation in our source files
On 2011-09-09 22:36, Russ Allbery wrote:
> Jakub Wilk <jwilk@debian.org> writes:
>
>> Yes, a few files have a "cperl-indent-level: 8" declaration. On the
>> other hand, some of them have also contradictory "vim: ts=4"
>> declaration. :(
>
>> Personally I'd prefer 4*space indentation everywhere. I could live with
>> tabs, but tabs mixed with spaces make me cringe.
>
> I'm basically in the same camp, although the most important thing to me
> for tab/space policy is that the right Emacs gunk is in the file so that
> the right thing happens automatically. But in general I use four-space
> indents and never put tabs in files.
>
So we are looking at a 4 space indentation for each basic block?
if ($a) {
do_stuff();
}
How about "extended ifs"?
if(<some very long condition> &&
<even more condition)
do_stuff();
}
- and -
do_stuff unless <some very long condition> &&
<even more condition>;
Would that be 4 spaces from the indentation (as shown above) or 4 spaces
from the base line (would align the "<even more condition>" in the first
part with "do_stuff()")? Alternatively do we do something different there?
Are there other cases worth considering/debating?
~Niels
Reply to: