unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Lanning <lanning@gmail.com>
Cc: 22270@debbugs.gnu.org, Alan Mackenzie <acm@muc.de>
Subject: bug#22270: Indentation following a multi-line Java annotation not correct
Date: Thu, 03 Dec 2020 11:39:23 +0100	[thread overview]
Message-ID: <87ft4nuqas.fsf@gnus.org> (raw)
In-Reply-To: <CAH0R2Fv-Zsy9nx6eOx2TbJQiMs2Dee463Grq7V9DB4+hpiP0iw@mail.gmail.com> (lanning@gmail.com's message of "Tue, 29 Dec 2015 16:56:51 -0800")

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?

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





  reply	other threads:[~2020-12-03 10:39 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 [this message]
2021-02-01 20:48   ` Alan Mackenzie
     [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

  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=87ft4nuqas.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=22270@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=lanning@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).