help-gnu-emacs
[Top][All Lists]
Advanced

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

indention in cc-mode not as expected


From: mfl
Subject: indention in cc-mode not as expected
Date: Mon, 6 Oct 2008 21:18:38 -0700 (PDT)
User-agent: G2/1.0

I am trying to indent the following code using c-indent-region

void foo()
{
if(true)
{
foo1();
foo2();
}
}

I want to get the following:
void foo()
{
        if(true)
        {
                foo1();
                foo2();
        }
}

However, c-indent-region keeps generating the following:
void foo()
{
        if(true)
                {
                        foo1();
                        foo2();
                }
}

I tried different values for these options: c-tabs-always-indent, c-
insert-tab-function, but none of them worked.
Can someone please help me on this? or is there a function to do "tab-
to-the-left" for a region in emacs?
Thanks.




reply via email to

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