From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glen Stark Newsgroups: gmane.emacs.help Subject: don't indent on nested namespaces in c++ mode Date: Thu, 26 Feb 2015 15:03:26 GMT Organization: Easynews - www.easynews.com Message-ID: <2BGHw.868387$ls6.741986@fx16.am4> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1424963121 8376 80.91.229.3 (26 Feb 2015 15:05:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2015 15:05:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 26 16:05:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YR006-00071W-Um for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 16:05:19 +0100 Original-Received: from localhost ([::1]:59489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR006-0001rc-CQ for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 10:05:18 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!peer01.fr7!news.highwinds-media.com!post01.fr7!fx16.am4.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Original-Lines: 37 Original-X-Complaints-To: abuse@easynews.com X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. X-Received-Body-CRC: 4007789555 X-Received-Bytes: 1608 Original-Xref: usenet.stanford.edu gnu.emacs.help:210629 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102903 Archived-At: 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.