From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Raoult Newsgroups: gmane.emacs.bugs Subject: bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration Date: Fri, 11 Dec 2020 20:22:19 +0100 Message-ID: References: <87h7otr9g5.fsf@lorien.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17441"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45160@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 11 20:56:52 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knoX6-0004Qp-C4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 20:56:52 +0100 Original-Received: from localhost ([::1]:52968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knoX5-0002N0-DX for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 14:56:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kno0N-0000XU-67 for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 14:23:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kno0M-0003ub-8H; Fri, 11 Dec 2020 14:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kno0M-0003fl-5A; Fri, 11 Dec 2020 14:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bruno Raoult Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 11 Dec 2020 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45160 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 45160-submit@debbugs.gnu.org id=B45160.160771455914072 (code B ref 45160); Fri, 11 Dec 2020 19:23:02 +0000 Original-Received: (at 45160) by debbugs.gnu.org; 11 Dec 2020 19:22:39 +0000 Original-Received: from localhost ([127.0.0.1]:42989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knnzz-0003eu-GV for submit@debbugs.gnu.org; Fri, 11 Dec 2020 14:22:39 -0500 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:38095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knnzw-0003ec-9h for 45160@debbugs.gnu.org; Fri, 11 Dec 2020 14:22:37 -0500 Original-Received: by mail-wm1-f43.google.com with SMTP id g185so9628603wmf.3 for <45160@debbugs.gnu.org>; Fri, 11 Dec 2020 11:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tEhCdMlLa2OUYNf9Vrcu/48ApqnAa0LMQdFeIhm+fro=; b=pQ5FGfgtHBBW5p7Hd0fXO5GIt4EuhyKHQv/yi4TUCdLw9Mwrqndaui2YgjzkXVNP30 tciXXU1CUEeRgxBWIUG8QwhzzMjE7lJIr+v7u9ofrNV1LimybYRdo8o382rI0OgQlub5 Dr29sG2G07fho3FSPoIwb7Twnsgw/FxFkoKkAdxu7IPbRlVtH3N3MtG1okM2bABMiaU3 ffibyI4OdhdV8d4GK674ARQbIXvb8PNfzOKVe2LydKhwN/tUMu+caf9zP0KKgI54RZ7o ecNyaEVv0fwYkWbWlTog4YxY0uHOWo7rCq6vpdqdzhrVZRv8FVmb5csO/x79Lx3CsaYo oPcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tEhCdMlLa2OUYNf9Vrcu/48ApqnAa0LMQdFeIhm+fro=; b=Xle1zLWmGUWqJPJQeX8nqWlYUfIaCPwUCgkFE1eD0DnslghAUyrCzk85W58qPj1fhw H6ZrrgEymO3CGcXAhIeF08ndrCm2lAjvFu9FJUgxoF/hb+BidNzQemz5IBZqo9Kmt/mV puzVmiW3F1DIGtpHETksuPDcMryX7Wzrfy3t72hqs7cVmR+4m44smPijSx6MO2Q3h8ZW thaz8SeIig5qkR5K/nqNwxv+EPXvHqJuUXHv4lNSUKyCf0fwvf2eO2DTFKMPrQwy1h16 Y/F3oKOqCTMY34p1DQ/W4Hp+zLD4l2Ejt9Yo866oarKQTR9QA/Sqh9xJuPs0Zw/YSrPc XjMQ== X-Gm-Message-State: AOAM533NFUB7avdvyPZ+F+1YlNqiisHsu8f6sSnprmCJfwFCCmL8k3iZ 5KXDIhwg6+vDzZAt2c0LKHsqKBGiS/Qcgld/o3U= X-Google-Smtp-Source: ABdhPJzUgnavnbFlwm8RehTK/4nJr0eKwBV9pH8oW4UPsDC51TLNnOuyGNBTBqYXJb6oQtj1DLmYz+NACgQP9itkYc8= X-Received: by 2002:a05:600c:2255:: with SMTP id a21mr15422141wmm.122.1607714550525; Fri, 11 Dec 2020 11:22:30 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195801 Archived-At: Thanks Alan, On Fri, 11 Dec 2020 at 17:33, Alan Mackenzie 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.