GNU bug report logs -
#15465
CC-mode misaligns enums that implement an interface in Java
Previous Next
Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>
Date: Thu, 26 Sep 2013 08:32:02 UTC
Severity: normal
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 15465 <at> debbugs.gnu.org (full text, mbox):
Hi, Paul.
Paul Pogonyshev <pogonyshev <at> gmail.com>, wrote:
> Since Java mode finally got some improvements recently, maybe someone
> can solve this too. In Java, enumerations can implement interfaces.
> However, CC-mode doesn't handle that well. Compare this indentation,
> for example:
> public enum X
> {
> A,
> B;
> }
> vs.
> public enum X implements Y
> {
> A,
> B;
> }
Yes, that is a bug. It happens because the code that checks for being
inside an "enum" body only searches a maximum of two tokens backwards from
the "{" for the "enum" keyword.
> Fontification of 'A' and 'B' also changes when I add 'implements'
> keyword.
This was happening on any buffer change near the "{" for basically the
same reason.
I've committed a fix, revision #114474, to the bzr trunk. Could you try
out the change, please, and either confirm it fixes the bug properly, or
tell me what hasn't yet been fixed.
Thanks for taking the trouble to report this, and thanks even more that
the report was so crisp, concise and to the point.
Paul
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 11 years and 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.