[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
don't indent on nested namespaces in c++ mode
From: |
Glen Stark |
Subject: |
don't indent on nested namespaces in c++ mode |
Date: |
Thu, 26 Feb 2015 15:03:26 GMT |
User-agent: |
Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
Hi everyone. I'm in Emacs 24.4.1. I am able to get zero indentation
on nested namespaces, if they are declared on separate lines, but not if
they are on a single line.
I have the following line in my configuration:
(c-set-offset 'innamespace 0)
Which produces the desired result for:
namespace foo{
namespace bar{
class foobar{};
}
But when I have nested namespaces declared on a single line it
produces the undesired:
namespace foo{ namespace bar{
class foobar{};
}
I've also tried the following (which I got from stack overflow), but it
seems to have no effect whatsoever:
(defconst my-cc-style
'("cc-mode"
(c-offsets-alist . ((innamespace . [0])))))
(c-add-style "my-cc-mode" my-cc-style)
Can anyone explain what's going on, and tell me how to get the desired
effect?
Many thanks,
Glen Stark.
- don't indent on nested namespaces in c++ mode,
Glen Stark <=