unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Change ellemtel indention (C++)
@ 2006-12-02 14:47 Eric Lilja
  2006-12-02 15:05 ` Eric Lilja
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Lilja @ 2006-12-02 14:47 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Change ellemtel indention (C++)
  2006-12-02 14:47 Change ellemtel indention (C++) Eric Lilja
@ 2006-12-02 15:05 ` Eric Lilja
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Lilja @ 2006-12-02 15:05 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-12-02 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02 14:47 Change ellemtel indention (C++) Eric Lilja
2006-12-02 15:05 ` Eric Lilja

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).