From unknown Sun Aug 17 22:03:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45160 <45160@debbugs.gnu.org> To: bug#45160 <45160@debbugs.gnu.org> Subject: Status: 27.1; [C] wrong indent for knr-style arguments declaration Reply-To: bug#45160 <45160@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:03:11 +0000 retitle 45160 27.1; [C] wrong indent for knr-style arguments declaration reassign 45160 emacs,cc-mode submitter 45160 Bruno severity 45160 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 10 10:02:48 2020 Received: (at submit) by debbugs.gnu.org; 10 Dec 2020 15:02:48 +0000 Received: from localhost ([127.0.0.1]:39006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knNSy-0006hI-F7 for submit@debbugs.gnu.org; Thu, 10 Dec 2020 10:02:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:46134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knNSw-0006h9-G6 for submit@debbugs.gnu.org; Thu, 10 Dec 2020 10:02:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knNSw-0003uo-9T for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2020 10:02:46 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:34853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knNSq-0002j4-Mv for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2020 10:02:46 -0500 Received: by mail-wm1-x336.google.com with SMTP id e25so5648113wme.0 for ; Thu, 10 Dec 2020 07:02:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=NS5VNg+DagIMDB6CxNlUPKaeFMfa6WP3vvBDBxaIELo=; b=nGG7cGIH7x4VST3PKW5cOC7jZaZVNF3iw3KBJUQWRfvJnWrIKxpoY2NFARYzu2eQRe q3JqOiVFCTnZtDN5uMhJO41CKmv6mPNthZKn6qiBZpXPor+OUvOetwwlrye7+YXOhVmx 3XdrnNQKxw8qtMLPSZmbgDebzvn1iB5XwIEptfSUniAO/4GLncB+ZDxMfk1wBkikLR58 pTmVMHnunUVDtNaHxbVtgPMDLarUNBLXqsGgiWbxLJXE4gPz0xdjs16iIKalKjXZVE90 4f6Cu/T+zx1yVYTP67TVfYiFq3JGW+ZQ1DUGJ8jbn7mrXNBiT2XlgC5ZrESS1bHPIl4z E/Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=NS5VNg+DagIMDB6CxNlUPKaeFMfa6WP3vvBDBxaIELo=; b=hziMc8lmIhvTbX4yfn3my2sVpvk1OUzjRzo9VxZxLPE0pePKMIA9bubVGCFfU4RkbO aOb41mCjoaF/iK4BJBmjgj+HjH0Gx3hC7rCybylm6IHia/Tzd3ld6FbBo9JVn8Ns+Hd+ DsvfKUZAmas4xrzTIhcH+yxO4DZTrsnTZywo6bEhOtm56enjkuZ6ZMQ2HppQjLjfqOA1 Sj0zOJ7gP0Fn9xEd50uq96z2Q/q2SVw1M0Un7cEiKQuGsk4a4MCBzHom2bJu8ayBNvdh oCbYFUe/vJMK+YliOuPMObIrF1YVS5XPGcprxmodafAaWX030d8StXymKAaS9s+6mRz/ C9Rg== X-Gm-Message-State: AOAM533BzUNLThZhcwDdYDPlbn2OtLUiXO+3oWurGURJ1dhkYYGJKm5l MUdrMMdm5Kkd2dCn5Y86h7Era1ogALk= X-Google-Smtp-Source: ABdhPJxUTpZxsJ8ZgQ1xQ9LHHmfGDXOCJTS/OHY33g2lOYNJIc7Fe3V6OIQl0rwHpvFeIQxVAPcJXQ== X-Received: by 2002:a1c:2605:: with SMTP id m5mr8762942wmm.111.1607612558766; Thu, 10 Dec 2020 07:02:38 -0800 (PST) Received: from lorien (home.raoult.com. [78.214.78.108]) by smtp.gmail.com with ESMTPSA id b9sm9613892wmd.32.2020.12.10.07.02.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 07:02:38 -0800 (PST) Received: from lorien (localhost [127.0.0.1]) by lorien (Postfix) with ESMTPS id 3971D1425C5 for ; Thu, 10 Dec 2020 16:02:37 +0100 (CET) From: Bruno To: bug-gnu-emacs@gnu.org Subject: 27.1; [C] wrong indent for knr-style arguments declaration Date: Thu, 10 Dec 2020 16:02:02 +0100 Message-ID: <87h7otr9g5.fsf@lorien.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=braoult@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Within "emacs -Q" session, open the following C source file: ------------------------------ foo.c int f(i, j, k) int i; int j; int k; { return 1; } int g(i, j, k) int i; int j, k; { return 1; } ------------------------------ Then, do "C-c ." (c-set-style) to "k&r", and "c-c c-o" (c-set-offset), and set "knr-argdecl-intro" to "+". We have now the following values in c-offsets-alist : knr-argdecl-intro : + (First line of a K&R C argument declaration) knr-argdecl : 0 (Subsequent lines in a K&R C argument declaration) re-indent foo.c. At this stage we expect the following indentation for arguments declarations. ------------------------------ expected indentation int f(i, j, k) int i; int j; int k; { return 1; } int g(i, j, k) int i; int j, k; { return 1; } ------------------------------ But we get the following result (please note line 11). ------------------------------ emacs indentation int f(i, j, k) int i; int j; int k; { return 1; } int g(i, j, k) int i; int j, k; { return 1; } ------------------------------ 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). Also, multiple variables on first arguments declaration line seems to have correct indentation. Regards, Bruno. In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) of 2020-10-29 built on lorien Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 20.04.1 LTS Recent messages: End of buffer [3 times] Beginning of buffer [3 times] Making completion list... Beginning of buffer [3 times] previous-line: Beginning of buffer user-error: No further undo information C-x C-g is undefined previous-line: Beginning of buffer [10 times] scroll-up-command: End of buffer command-execute: Buffer is read-only: # Quit Configured features: XPM JPEG TIFF GIF PNG SOUND GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS PDUMPER GMP Important settings: value of $LC_MESSAGES: C value of $LC_MONETARY: en_IE.UTF-8 value of $LC_NUMERIC: en_IE.UTF-8 value of $LC_TIME: en_IE.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (pp shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt help-fns radix-tree help-mode cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 70553 13929) (symbols 48 8643 2) (strings 32 22665 2290) (string-bytes 1 841592) (vectors 16 13093) (vector-slots 8 166207 22348) (floats 8 23 93) (intervals 56 501 6) (buffers 1000 17)) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 11 11:33:38 2020 Received: (at 45160) by debbugs.gnu.org; 11 Dec 2020 16:33:38 +0000 Received: from localhost ([127.0.0.1]:42756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knlMP-0003d5-LC for submit@debbugs.gnu.org; Fri, 11 Dec 2020 11:33:37 -0500 Received: from colin.muc.de ([193.149.48.1]:30586 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1knlMN-0003cs-PB for 45160@debbugs.gnu.org; Fri, 11 Dec 2020 11:33:36 -0500 Received: (qmail 77326 invoked by uid 3782); 11 Dec 2020 16:33:28 -0000 Received: from acm.muc.de (p4fe15d97.dip0.t-ipconnect.de [79.225.93.151]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Fri, 11 Dec 2020 17:33:28 +0100 Received: (qmail 8926 invoked by uid 1000); 11 Dec 2020 16:33:28 -0000 Date: Fri, 11 Dec 2020 16:33:28 +0000 To: Bruno Subject: Re: bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration 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=us-ascii Content-Disposition: inline In-Reply-To: <87h7otr9g5.fsf@lorien.i-did-not-set--mail-host-address--so-tickle-me> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45160 Cc: acm@muc.de, 45160@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Bruno. Thank you indeed for taking the trouble to report this bugi, and thanks even more for cutting the problem down to a minimal test case. On Thu, Dec 10, 2020 at 16:02:02 +0100, Bruno wrote: > Within "emacs -Q" session, open the following C source file: > ------------------------------ foo.c > int f(i, j, k) > int i; > int j; > int k; > { > return 1; > } > int g(i, j, k) > int i; > int j, k; > { > return 1; > } > ------------------------------ > Then, do "C-c ." (c-set-style) to "k&r", and "c-c c-o" (c-set-offset), > and set "knr-argdecl-intro" to "+". > We have now the following values in c-offsets-alist : > knr-argdecl-intro : + (First line of a K&R C argument declaration) > knr-argdecl : 0 (Subsequent lines in a K&R C argument declaration) > re-indent foo.c. At this stage we expect the following indentation for > arguments declarations. > ------------------------------ expected indentation > int f(i, j, k) > int i; > int j; > int k; > { > return 1; > } > int g(i, j, k) > int i; > int j, k; > { > return 1; > } > ------------------------------ > But we get the following result (please note line 11). > ------------------------------ emacs indentation > int f(i, j, k) > int i; > int j; > int k; > { > return 1; > } > int g(i, j, k) > int i; > int j, k; > { > return 1; > } > ------------------------------ > 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.) diff -r 863d08a1858a cc-engine.el --- a/cc-engine.el Thu Nov 26 11:27:52 2020 +0000 +++ b/cc-engine.el Fri Dec 11 15:57:08 2020 +0000 @@ -10849,11 +10849,11 @@ (low-lim (max (or lim (point-min)) (or macro-start (point-min)))) before-lparen after-rparen (here (point)) - (pp-count-out 20) ; Max number of paren/brace constructs before - ; we give up. + (pp-count-out 20) ; Max number of paren/brace constructs before + ; we give up ids ; List of identifiers in the parenthesized list. id-start after-prec-token decl-or-cast decl-res - c-last-identifier-range identifier-ok) + c-last-identifier-range semi-position+1) (narrow-to-region low-lim (or macro-end (point-max))) ;; Search backwards for the defun's argument list. We give up if we @@ -10887,8 +10887,8 @@ (setq after-rparen (point))) ((eq (char-before) ?\]) (setq after-rparen nil)) - (t ; either } (hit previous defun) or = or no more - ; parens/brackets. + (t ; either } (hit previous defun) or = or no more + ; parens/brackets. (throw 'knr nil))) (if after-rparen @@ -10945,31 +10945,35 @@ (forward-char) ; over the ) (setq after-prec-token after-rparen) (c-forward-syntactic-ws) + ;; Each time around the following checks one + ;; declaration (which may contain several identifiers). (while (and - (or (consp (setq decl-or-cast - (c-forward-decl-or-cast-1 - after-prec-token - nil ; Or 'arglist ??? - nil))) - (progn - (goto-char after-prec-token) - (c-forward-syntactic-ws) - (setq identifier-ok (eq (char-after) ?{)) - nil)) - (eq (char-after) ?\;) - (setq after-prec-token (1+ (point))) + (consp (setq decl-or-cast + (c-forward-decl-or-cast-1 + after-prec-token + nil ; Or 'arglist ??? + nil))) + (memq (char-after) '(?\; ?\,)) (goto-char (car decl-or-cast)) - (setq decl-res (c-forward-declarator)) - (setq identifier-ok - (member (buffer-substring-no-properties - (car decl-res) (cadr decl-res)) - ids)) - (progn - (goto-char after-prec-token) - (prog1 (< (point) here) - (c-forward-syntactic-ws)))) - (setq identifier-ok nil)) - identifier-ok)) + (save-excursion + (setq semi-position+1 + (c-syntactic-re-search-forward + ";" (+ (point) 1000) t))) + (c-do-declarators + semi-position+1 t nil nil + (lambda (id-start id-end _next _not-top + _func _init) + (if (not (member + (buffer-substring-no-properties + id-start id-end) + ids)) + (throw 'knr nil)))) + + (progn (forward-char) + (<= (point) here)) + (progn (c-forward-syntactic-ws) + t))) + t)) ;; ...Yes. We've identified the function's argument list. (throw 'knr (progn (goto-char after-rparen) > Regards, > Bruno. > In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) > of 2020-10-29 built on lorien > Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 > System Description: Ubuntu 20.04.1 LTS -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 11 14:22:39 2020 Received: (at 45160) by debbugs.gnu.org; 11 Dec 2020 19:22:39 +0000 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 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 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) MIME-Version: 1.0 References: <87h7otr9g5.fsf@lorien.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: From: Bruno Raoult Date: Fri, 11 Dec 2020 20:22:19 +0100 Message-ID: Subject: Re: bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration To: Alan Mackenzie Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45160 Cc: 45160@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 12 09:49:00 2020 Received: (at 45160-done) by debbugs.gnu.org; 12 Dec 2020 14:49:00 +0000 Received: from localhost ([127.0.0.1]:44222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ko6Ci-0003PT-C2 for submit@debbugs.gnu.org; Sat, 12 Dec 2020 09:49:00 -0500 Received: from colin.muc.de ([193.149.48.1]:21876 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ko6Ch-0003Ov-DF for 45160-done@debbugs.gnu.org; Sat, 12 Dec 2020 09:48:59 -0500 Received: (qmail 11430 invoked by uid 3782); 12 Dec 2020 14:48:53 -0000 Received: from acm.muc.de (p2e5d526c.dip0.t-ipconnect.de [46.93.82.108]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 12 Dec 2020 15:48:52 +0100 Received: (qmail 29727 invoked by uid 1000); 12 Dec 2020 14:48:52 -0000 Date: Sat, 12 Dec 2020 14:48:52 +0000 To: Bruno Raoult Subject: Re: bug#45160: 27.1; [C] wrong indent for knr-style arguments declaration 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=us-ascii Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45160-done Cc: 45160-done@debbugs.gnu.org, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Bruno. On Fri, Dec 11, 2020 at 20:22:19 +0100, Bruno Raoult wrote: > Thanks Alan, [ .... ] > > 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 ! It was a high quality bug report, and easy to diagnose. > 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. Thank you for such a fast test. I am closing the bug with this post. > Thanks again, > Bruno. > -- > 2 + 2 = 5, for very large values of 2. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sun Aug 17 22:03:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Jan 2021 12:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator