unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sam Pagenkopf <ssaammp@gmail.com>
Cc: 27130@debbugs.gnu.org, Alan Mackenzie <acm@muc.de>
Subject: bug#27130: c-mode indentation mistreats structs in function arguments
Date: Mon, 30 Nov 2020 12:11:56 +0100	[thread overview]
Message-ID: <87zh2zaykj.fsf@gnus.org> (raw)
In-Reply-To: <CAKiGDcO6hedSbWEP=VLq5U-7PunPewX_2JD_qm_Hs6W4NJH6+A@mail.gmail.com> (Sam Pagenkopf's message of "Mon, 29 May 2017 08:33:35 -0500")

Sam Pagenkopf <ssaammp@gmail.com> writes:

> In emacs 25.2.1.
>
> Relevant code:
>
>     draw_add(&battle.draw, (Drawn){
>             .kind = DRAW_RECT,
>                 .size = {40,24},
>                 .pos.border = {
>                 .align = {ALIGN_LEFT, ALIGN_TOP},
>                 .dist = 3
>             }
>         }
>         );
>
> My guess is that it's reading (Drawn){...} as a statement, and the , as
> the (,) C operator.

I'm not sure how this should be indented (as I didn't even know that
that was valid C).  But that does look wrong, in any case.  (I've
confirmed that it indents it the same way in Emacs 28.)

Alan?

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





  reply	other threads:[~2020-11-30 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 13:33 bug#27130: c-mode indentation mistreats structs in function arguments Sam Pagenkopf
2020-11-30 11:11 ` Lars Ingebrigtsen [this message]
2020-11-30 17:04   ` Alan Mackenzie
2020-12-02  9:55     ` 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=87zh2zaykj.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=27130@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=ssaammp@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).