GNU bug report logs - #25480
cc-mode: open-paren-in-column-0 of comment affects non-comment indentation

Previous Next

Packages: cc-mode, emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Wed, 18 Jan 2017 22:10:02 UTC

Severity: normal

Found in version 26.0.50

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50;
 cc-mode: punctuation in comments can affect non-comment indentation
Date: Wed, 18 Jan 2017 14:09:07 -0800
[Message part 1 (text/plain, inline)]
Hi. Found another possibly-obscure issue. I'm running a very recent
build of emacs: af3db69ee64

I have the attached minimized C source. If I

- load this source with emacs -Q
- move the point to 'struct'
- hit TAB

I would expect that line to be indented "correctly", with "correctly"
meaning starting at column 0 in this case. Instead, I see it indented to
column 2. This appears to be affected by the text in the preceding
comment. If I change "aaa)" to "aaa" then I get the desired behavior.

Thanks

[tst.h (text/x-chdr, inline)]
/*
aaa). bbb ccc <=
(dd >= f)
*/

struct S { int x; };

This bug report was last modified 7 years and 79 days ago.

Previous Next


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