emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wrong indentation level in certain nested C++ namespaces


From: Christian Schlotter
Subject: Wrong indentation level in certain nested C++ namespaces
Date: Sun, 14 Jan 2007 14:25:29 +0100

(This is a resend from my report one month ago to the CC Mode mailing
list, which I did receive no reaction on.)

Hello!

I am using GNU Emacs 22.0.92.1.  The following applies to CC Mode shipped
with that version as well as to CC Mode 5.31.3.

In my .emacs I have set '(c-offsets-alist (quote ((innamespace . 0)))), so
constructs nested inside namespace definitions should not be indented
relative to the definition.  Nevertheless, the function in the nested
namespace below is indented one level:

namespace ns1 { namespace ns2 {
    void test() {}
}}

However, if I change the snippet to

namespace ns1 {
namespace ns2 {
void test() {}
}}

the function is indented as desired.  This seems to be a regression with
regard to CC Mode shipped in GNU Emacs 21.4.1 -- I also tested with that
version and its indentation is correct in this case.

Best regards
Christian


In GNU Emacs 22.0.92.1 (i686-pc-linux-gnu, GTK+ Version 2.10.6)
 of 2007-01-05 on acer
X server distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--prefix=/usr' '--host=i686-pc-linux-gnu' 
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' 
'--sysconfdir=/etc' '--localstatedir=/var/lib' 
'--program-suffix=.emacs-22.0.92' '--without-carbon' '--with-x' '--with-xpm' 
'--without-toolkit-scroll-bars' '--with-jpeg' '--without-tiff' '--with-gif' 
'--with-png' '--with-x-toolkit=gtk' '--build=i686-pc-linux-gnu' 'CFLAGS=-O2' 
'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: de_DE.utf8
  value of $LC_NUMERIC: nil
  value of $LC_TIME: de_DE.utf8
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  global-cwarn-mode: t
  display-time-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]