[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C indentation customization
From: |
Eli Zaretskii |
Subject: |
Re: C indentation customization |
Date: |
Sat, 25 Jul 2015 10:38:23 +0300 |
> Date: Fri, 24 Jul 2015 22:25:27 -0700 (PDT)
> From: Rusi <rustompmody@gmail.com>
>
> On Friday, July 24, 2015 at 8:23:11 PM UTC+5:30, Rusi wrote:
> > On Friday, July 24, 2015 at 7:54:41 PM UTC+5:30, Rusi wrote:
> > > http://emacswiki.org/emacs/IndentingC
> > > seems to say that doing
> > >
> > > (setq c-default-style "linux"
> > > c-basic-offset 4)
> > >
> > > will indent like this:
> > >
> > > if(foo)
> > > {
> > > bar++;
> > > }
> > >
> > > ie '{' is not indented, contents is 4 space indented.
> > >
> > > Likewise setting to bsd
> > > as described https://en.wikipedia.org/wiki/Indent_style#Allman_style
> > > seems to say that the '{' wont be indented
> > >
> > > None of these work; ie the '{' is always indented.
> >
> > Evidently restarting emacs makes it work
> > [ie these bindings need to be in effect before CC-mode is loaded(?)]
>
> Should not the early-binding of these deserve a place somewhere (prominent)
> in the docs?
> Something like:
> - For permanent settings do ...
> - For temporary trying out do ...
Did you read the node "Config Basics" in the CC Mode manual? It seems
to discuss precisely these issues.