all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 22270@debbugs.gnu.org, Lanning <lanning@gmail.com>
Subject: bug#22270: Indentation following a multi-line Java annotation not correct
Date: Mon, 1 Feb 2021 20:48:55 +0000	[thread overview]
Message-ID: <YBhpN0RF1tqkiLCL__39867.5564605341$1612212652$gmane$org@ACM> (raw)
In-Reply-To: <87ft4nuqas.fsf@gnus.org>

Hello, Lars.

On Thu, Dec 03, 2020 at 11:39:23 +0100, Lars Ingebrigtsen wrote:
> Lanning <lanning@gmail.com> writes:

> > In the file cc-engine the function c-guess-basic-syntax doesn't
> > always properly handle indentation after a Java annotation.
> > In the case where the annotation spans multiple lines, the
> > following code in indented to be in-line with the last line
> > of the annotation:

> >     @AnAnnotation(param1=1,
> >                   param2=2)
> >                   public void run() {
> >     }

> > The problem is in the CASE 5N clause, where the code calls
> >     (c-add-syntax 'annotation-top-cont (c-point 'boi))
> > Instead of moving to the previous line, it should move to the
> > beginning of the annotation
> >     (prog1
> >         (c-add-syntax 'annotation-top-cont (progn (c-beginning-of-statement-1)
> > (point)))
> >       (goto-char placeholder))

> Emacs 28 behaves the same way, and that does seem to be the wrong
> indentation.

> Alan?

I think this has already been fixed, quite recently, indeed as a
minor supporting part of 

    commit 92c56300c317c9e5573dca787a2cf20f777b3179
    Author: Alan Mackenzie <acm@muc.de>
    Date:   Tue Dec 15 12:09:47 2020 +0000

        CC Mode: Optimize for scrolling large buffers containing few braces

The fix had been in standalone CC Mode for a few years, but somehow
evaded getting merged to savannah.  The above commit hit merge conflicts
around the area, and adding in the fix to the Java annotations fixed
those conflicts at the same time.

So, could I ask you to try out the bug scenario again, notice that it is
now fixed, and close the bug.

Thanks!

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2021-02-01 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  0:56 bug#22270: Indentation following a multi-line Java annotation not correct Lanning
2020-12-03 10:39 ` Lars Ingebrigtsen
2021-02-01 20:48   ` Alan Mackenzie [this message]
     [not found]   ` <YBhpN0RF1tqkiLCL@ACM>
2021-02-02  8:53     ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to='YBhpN0RF1tqkiLCL__39867.5564605341$1612212652$gmane$org@ACM' \
    --to=acm@muc.de \
    --cc=22270@debbugs.gnu.org \
    --cc=lanning@gmail.com \
    --cc=larsi@gnus.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.