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

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

bug#15465: CC-mode misaligns enums that implement an interface in Java


From: Alan Mackenzie
Subject: bug#15465: CC-mode misaligns enums that implement an interface in Java
Date: Sat, 28 Sep 2013 17:33:23 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Paul.

Paul Pogonyshev <address@hidden>, 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).





reply via email to

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