unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Paul Pogonyshev <pogonyshev@gmail.com>
Cc: 15465@debbugs.gnu.org
Subject: bug#15465: CC-mode misaligns enums that implement an interface in Java
Date: Sat, 28 Sep 2013 17:33:23 +0000	[thread overview]
Message-ID: <20130928173323.GA11317@acm.acm> (raw)
In-Reply-To: <CAG7Bpaog1rh0YbiCb=FpmdPZ2kHXuffnBUuEivtyHa5OE++R8A@mail.gmail.com>

Hi, Paul.

Paul Pogonyshev <pogonyshev@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).





  reply	other threads:[~2013-09-28 17:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26  8:31 bug#15465: CC-mode misaligns enums that implement an interface in Java Paul Pogonyshev
2013-09-28 17:33 ` Alan Mackenzie [this message]
2013-09-28 19:15   ` Paul Pogonyshev
2013-09-28 21:33     ` Alan Mackenzie
2013-09-29 15:03     ` Alan Mackenzie
2013-09-30  7:23       ` Paul Pogonyshev
2013-10-13 21:38         ` Alan Mackenzie
2013-10-14  9:19           ` Paul Pogonyshev
2013-10-20 14:37             ` Alan Mackenzie
2013-10-21 11:00               ` Paul Pogonyshev
2013-10-25 20:29                 ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130928173323.GA11317@acm.acm \
    --to=acm@muc.de \
    --cc=15465@debbugs.gnu.org \
    --cc=pogonyshev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).