GNU bug report logs - #2141
C mode indentation problem

Previous Next

Packages: cc-mode, emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Sun, 1 Feb 2009 19:45:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Reuben Thomas <rrt <at> sc3d.org>, 2141 <at> debbugs.gnu.org
Cc: bug-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
Subject: bug#2141: C mode indentation problem
Date: Sun, 1 Feb 2009 21:23:42 +0000
Hi, Reuben,

On Sun, Feb 01, 2009 at 07:38:54PM +0000, Reuben Thomas wrote:
> Running Emacs from CVS head as "./emacs -Q foo.c" to create a new buffer 
> foo.c in C mode, if I enter the following text, indenting as I go:

> ----cut here----
> int main (void)
> {
>   int foo;
> 
>   switch (foo)
>     {
>     case BLAH | 'a':
>       bar = 0;
>     break;
> ---cut here----

> it is indented as above, which I believe is wrong, as the "break" should be 
> indented to the same column as the previous line. If I change the case line 
> to simply "case BLAH:" then this does indeed happen.

This is indeed a bug.  I'm looking into it now.

Thanks for reporting it!

-- 
Alan Mackenzie (Nuremberg, Germany).





This bug report was last modified 16 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.