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

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

Re: Change ellemtel indention (C++)


From: Eric Lilja
Subject: Re: Change ellemtel indention (C++)
Date: 2 Dec 2006 07:05:47 -0800
User-agent: G2/1.0

Eric Lilja skrev:

> Hello, in ellemtel indentation mode c++ access labels (public, private,
> proteceted) are indented from the opening brace of the class, like
> this:
>
> class Foo
> {
>    public:
>       Foo() {}
> };
>
> I want it to look like this:
>
> class Foo
> {
> public:
>    Foo() {}
> };
>
>
> I changed ellemtel in the following way and thought I had it:
> (c-set-style "ellemtel")
> (c-set-offset 'access-label '--)
> (c-set-offset 'topmost-intro '-)
> (c-set-offset 'inline-open '-)
>
> But then I noticed that messes up indentation after the opening brace
> of an enclosing namespace:
> namespace
> {
> class Foo
> {
> public:
>    Foo() {}
> };
> }
>
> I want it to be:
> namespace
> {
>    class Foo
>    {
>    public:
>       Foo() {}
>    };
> }
>
> How should I alter ellemtel to achieve this without breaking anything
> else?
>
> / E

Seems like this does the trick without breaking anything else (what
I've noticed so far):
(c-set-style "ellemtel")
(c-set-offset 'inclass '+)
(c-set-offset 'access-label '-)

/ E



reply via email to

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