GNU bug report logs -
#45160
27.1; [C] wrong indent for knr-style arguments declaration
Previous Next
Reported by: Bruno <braoult <at> gmail.com>
Date: Thu, 10 Dec 2020 15:03:01 UTC
Severity: normal
Found in version 27.1
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 45160 <at> debbugs.gnu.org (full text, mbox):
Thanks Alan,
On Fri, 11 Dec 2020 at 17:33, Alan Mackenzie <acm <at> 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.
This bug report was last modified 4 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.