From: "Óscar Fuentes" <ofv@wanadoo.es>
To: help-gnu-emacs@gnu.org
Subject: Re: don't indent on nested namespaces in c++ mode
Date: Thu, 26 Feb 2015 16:35:44 +0100 [thread overview]
Message-ID: <87385s8z3j.fsf@wanadoo.es> (raw)
In-Reply-To: 2BGHw.868387$ls6.741986@fx16.am4
Glen Stark <mail@glenstark.net> writes:
> 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?
I cannot replicate your problem with my config. My style has (among
many other things)
(innamespace . -)
prev parent reply other threads:[~2015-02-26 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 15:03 don't indent on nested namespaces in c++ mode Glen Stark
2015-02-26 15:35 ` Óscar Fuentes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87385s8z3j.fsf@wanadoo.es \
--to=ofv@wanadoo.es \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).