[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27130: c-mode indentation mistreats structs in function arguments
From: |
Lars Ingebrigtsen |
Subject: |
bug#27130: c-mode indentation mistreats structs in function arguments |
Date: |
Mon, 30 Nov 2020 12:11:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
- bug#27130: c-mode indentation mistreats structs in function arguments,
Lars Ingebrigtsen <=