all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glen Stark <mail@glenstark.net>
To: help-gnu-emacs@gnu.org
Subject: don't indent on nested namespaces in c++ mode
Date: Thu, 26 Feb 2015 15:03:26 GMT	[thread overview]
Message-ID: <2BGHw.868387$ls6.741986@fx16.am4> (raw)

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.


             reply	other threads:[~2015-02-26 15:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 15:03 Glen Stark [this message]
2015-02-26 15:35 ` don't indent on nested namespaces in c++ mode Óscar Fuentes

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='2BGHw.868387$ls6.741986@fx16.am4' \
    --to=mail@glenstark.net \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.