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

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

bug#22358: 24.5; Analysis and indentation of Java default interface meth


From: Alan Mackenzie
Subject: bug#22358: 24.5; Analysis and indentation of Java default interface methods incorrect
Date: Sat, 23 Jan 2016 19:52:06 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello again, Lanning.

On Wed, Jan 13, 2016 at 04:42:34PM -0800, Lanning wrote:
> Yep, that fixes it. Thanks, and esp for the quick turn-around.

OK, I've fixed the problem in savannah, so I'm closing this bug.

> By "complicated" I mean that there are a lot of connections between things.
> Not being familiar with the code, with all the languages supported, and so
> on, I have to assume that a small change may have large consequences.

> Anyway... I've got a fix for you. The problem has to do with indentation of
> multi-line Java annotations. More accurately, the indentation of the next
> line after a multi-line annotation. Here's an example that illustrates the
> problem. The annotations should all be aligned, and the method should line
> up with the all of them.

> public class Foo {
>     @AnAnnotation("hello")
>     @AnotherAnnotation(list = { "one", "two",
>                                 "three", "four" },
>         value = "something")
>     @YetAnother
>     @AndYetAnother(
>         a = b,
>         c = d
>     )
>     @DieAnotherDay("you bet")
>     public void run() {
>     }

> } // Foo

> The problem is that the subsequent line is indented relative to the
> previous *line*, not the previous "expression".

You may not believe this, but this bug was fixed (for the upcoming 25.1
release) on 12th January, the day before you sent me your last post.
The solution implemented is for the anchor point to be at the
indentation of the line containing the start of the previous annotation.
If you'd like, I can send you a patch based on Emacs 24.5.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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