bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-indent] brace-line-up feature mod for indent


From: Kim Saunders
Subject: Re: [Bug-indent] brace-line-up feature mod for indent
Date: 25 Jul 2002 12:47:48 +1200

> Actually, what I'm objecting to is the extra indentation within the
> braces.  If there was a separate "indent within braces" option, that
> would be more flexible than my solution, but as it is, the only way to
> get your code inside your braces to line up with the braces is to have
> your general indent level be zero (-i0), which of course messes up all
> other indentation.

I'm not really with you there. The indenting within the bracing is fine,
because that's what many people want and are used to.

The immediate problem that in:

if (a)
        {
                foo();
        {
else
        bar();

foo() and bar() are indented differently does seem inconsistent to me.

Are you wanting something like this:

void foo ()
{
    int bar;

    if (a)
        {
        bar++;
        }
    else
        bar--;
}

KimS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]