[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration
From: |
Bruno Raoult |
Subject: |
bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration |
Date: |
Fri, 11 Dec 2020 20:22:19 +0100 |
Thanks Alan,
On Fri, 11 Dec 2020 at 17:33, Alan Mackenzie <acm@muc.de> wrote:
> > It should be noted that if we separate each argument on separate lines
> > (function f), indentation is correct.
> > It is incorrect if multiple variables are in same declaration (function
> > g).
>
> Yes. Somehow, CC Mode managed not to cater for the occurrence of two or
> more identifiers in the same declaration.
>
> > Also, multiple variables on first arguments declaration line seems to
> > have correct indentation.
>
> Indeed.
>
> The following patch should fix the problem. Would you please apply it
> to your Emacs (cc-engine.el is in .../emacs/lisp/progmodes) and byte
> compile cc-engine.el. Then please try it out on your real source code,
> and either confirm the bug has indeed been fixed, or say what's still
> wrong. (If you would like any help with the patching or byte compiling,
> feel free to send me private email.)
That fix was really fast !
I applied the patch, and it appears to work in a few source files I did try.
I did not notice any side effect so far : I will keep your version,
and let you know (in this bug thread) if I notice any issue that is
not present in original version.
Thanks again,
Bruno.
--
2 + 2 = 5, for very large values of 2.