unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Raoult <braoult@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 45160@debbugs.gnu.org
Subject: bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration
Date: Fri, 11 Dec 2020 20:22:19 +0100	[thread overview]
Message-ID: <CAJA1Y2a3RheAcO_=f=T0tHWWNrU1vA9VW9b+f1oN989mVOXHVQ@mail.gmail.com> (raw)
In-Reply-To: <X9OfWH7qzSNa4UYC@ACM>

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.





  reply	other threads:[~2020-12-11 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 15:02 bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration Bruno
2020-12-11 16:33 ` Alan Mackenzie
2020-12-11 19:22   ` Bruno Raoult [this message]
2020-12-12 14:48     ` Alan Mackenzie

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='CAJA1Y2a3RheAcO_=f=T0tHWWNrU1vA9VW9b+f1oN989mVOXHVQ@mail.gmail.com' \
    --to=braoult@gmail.com \
    --cc=45160@debbugs.gnu.org \
    --cc=acm@muc.de \
    /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).