From unknown Sat Aug 16 11:12:16 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#7918 <7918@debbugs.gnu.org> To: bug#7918 <7918@debbugs.gnu.org> Subject: Status: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Reply-To: bug#7918 <7918@debbugs.gnu.org> Date: Sat, 16 Aug 2025 18:12:16 +0000 retitle 7918 [PATCH] cc-mode: only the first clause of a for-loop should be= checked for declarations reassign 7918 emacs,cc-mode submitter 7918 Daniel Colascione severity 7918 minor tag 7918 fixed confirmed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 26 01:28:23 2011 Received: (at submit) by debbugs.gnu.org; 26 Jan 2011 06:28:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Phyrf-0003aA-2x for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:28:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Phyrd-0003Zz-DH for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:28:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhyzT-00021L-1b for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:36:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:35370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhyzS-00021H-V5 for submit@debbugs.gnu.org; Wed, 26 Jan 2011 01:36:27 -0500 Received: from [140.186.70.92] (port=50751 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhyzR-0002Nt-Pa for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:36:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhyzP-00020t-BH for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:36:25 -0500 Received: from mail-qy0-f176.google.com ([209.85.216.176]:51065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhyzP-00020f-4T for bug-gnu-emacs@gnu.org; Wed, 26 Jan 2011 01:36:23 -0500 Received: by qyk10 with SMTP id 10so642777qyk.0 for ; Tue, 25 Jan 2011 22:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=eXRRKej50vcY91YF8SZxXFXsjTmC58i3W41HltEWmVQ=; b=XNsGYmU82hpQojKaC00DnO8hDnEflYc5uCNSEo5S8Mfxhn3UWkHtQHh8rk8H+WQk8u ysbzPeyw+doeuPYacl9TVgXyxlVKtPO1HQyTWUQ24waac3y/aMewmwvsYsq1TA2jOuzA B2lCPpLqZIyAv/sgYanjfRip0sggiPtcmtfPU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GWcNhBT5biJP+r95HAVHyEns8ulQOh1CFipoDivuSWb3tl4yoAoKSfh9YUiJaRtNVx PJlGL2u7qZKXwFC6dvxmh2oal3R/epcvqmYziP+WrBUbAY+Aw+2o10JKsP5jiHH4lKeK 4aAUU6UNAOx5J72u/U9uNj1+vXSaV4v9kaSDI= MIME-Version: 1.0 Received: by 10.229.211.206 with SMTP id gp14mr45657qcb.289.1296023782312; Tue, 25 Jan 2011 22:36:22 -0800 (PST) Received: by 10.220.200.11 with HTTP; Tue, 25 Jan 2011 22:36:22 -0800 (PST) Date: Tue, 25 Jan 2011 22:36:22 -0800 Message-ID: Subject: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations From: Daniel Colascione To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary=0016e6509d4a2a4cf8049aba0d4f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --0016e6509d4a2a4cf8049aba0d4f Content-Type: text/plain; charset=ISO-8859-1 // This code has no variable declarations void foo() { for (; (DWORD) a * b ;) ; for (; a * b ;) ; } --0016e6509d4a2a4cf8049aba0d4f Content-Type: text/plain; charset=US-ASCII; name="fix-for.patch" Content-Disposition: attachment; filename="fix-for.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gjdv1y0t0 PT09IG1vZGlmaWVkIGZpbGUgJ2xpc3AvcHJvZ21vZGVzL2NjLWZvbnRzLmVsJwotLS0gbGlzcC9w cm9nbW9kZXMvY2MtZm9udHMuZWwJMjAxMC0xMi0wNyAxMjoxNToyOCArMDAwMAorKysgbGlzcC9w cm9nbW9kZXMvY2MtZm9udHMuZWwJMjAxMS0wMS0yNSAxMToxMDowMCArMDAwMApAQCAtMTA4MCw3 ICsxMDgwLDggQEAKIAkgIDs7IG8gLSAnPD4gaWYgdGhlIGFyZ2xpc3QgaXMgb2YgYW5nbGUgYnJh Y2tldCB0eXBlOwogCSAgOzsgbyAtICdhcmdsaXN0IGlmIGl0J3Mgc29tZSBvdGhlciBhcmdsaXN0 OwogCSAgOzsgbyAtIG5pbCwgaWYgbm90IGluIGFuIGFyZ2xpc3QgYXQgYWxsLiAgVGhpcyBpbmNs dWRlcyB0aGUKLQkgIDs7ICAgcGFyZW50aGVzaXNlZCBjb25kaXRpb24gd2hpY2ggZm9sbG93cyAi aWYiLCAid2hpbGUiLCBldGMuCisJICA7OyAgIHBhcmVudGhlc2lzZWQgY29uZGl0aW9uIHdoaWNo IGZvbGxvd3MgImlmIiwgIndoaWxlIiwgZXRjLiwKKwkgIDs7ICAgYnV0IG5vdCAiZm9yIiwgd2hp Y2ggaXMgJ2FyZ2xpc3QgYWZ0ZXIgYDsnLgogCSAgY29udGV4dAogCSAgOzsgVGhlIHBvc2l0aW9u IG9mIHRoZSBuZXh0IHRva2VuIGFmdGVyIHRoZSBjbG9zaW5nIHBhcmVuIG9mCiAJICA7OyB0aGUg bGFzdCBkZXRlY3RlZCBjYXN0LgpAQCAtMTEwOSw3ICsxMTEwLDcgQEAKIAkgIDs7IGBjLWZvcndh cmQtZGVjbC1vci1jYXN0LTEnIGFuZCBgYy1mb3J3YXJkLWxhYmVsJyBmb3IKIAkgIDs7IGxhdGVy IGZvbnRpZmljYXRpb24uCiAJICAoYy1yZWNvcmQtdHlwZS1pZGVudGlmaWVycyB0KQotCSAgbGFi ZWwtdHlwZQorCSAgbGFiZWwtdHlwZSBwYXJlbi1zdGF0ZSBtb3N0LWVuY2xvc2luZy1icmFjZQog CSAgYy1yZWNvcmQtcmVmLWlkZW50aWZpZXJzCiAJICA7OyBNYWtlIGBjLWZvcndhcmQtdHlwZScg Y2FsbHMgbWFyayB1cCB0ZW1wbGF0ZSBhcmdsaXN0cyBpZgogCSAgOzsgaXQgZmluZHMgYW55LiAg VGhhdCdzIG5lY2Vzc2FyeSBzbyB0aGF0IHdlIGxhdGVyIHdpbGwKQEAgLTExNzEsNyArMTE3Miw2 IEBACiAJCQkJICdmb250LWxvY2stZnVuY3Rpb24tbmFtZS1mYWNlKSkpKQogCSAgKGMtZm9udC1s b2NrLWZ1bmN0aW9uLXBvc3RmaXggbGltaXQpKQogCi0JIAogCSAoc2V0cSBzdGFydC1wb3MgKHBv aW50KSkKIAkgKHdoZW4KIAkgICAgIDs7IFRoZSByZXN1bHQgb2YgdGhlIGBpZicgY29uZGl0aW9u IGJlbG93IGlzIHRydWUgd2hlbiB3ZSBkb24ndCByZWNvZ25pemUgYQpAQCAtMTE4OSw3ICsxMTg5 LDMxIEBACiAJICAgIDs7IChlLmcuICJmb3IgKCIpLgogCSAgICAobGV0ICgodHlwZSAoYW5kICg+ IG1hdGNoLXBvcyAocG9pbnQtbWluKSkKIAkJCSAgICAgKGMtZ2V0LWNoYXItcHJvcGVydHkgKDEt IG1hdGNoLXBvcykgJ2MtdHlwZSkpKSkKLQkgICAgICAoY29uZCAoKG5vdCAobWVtcSAoY2hhci1i ZWZvcmUgbWF0Y2gtcG9zKSAnKD9cKCA/LCA/XFsgPzwpKSkKKwkgICAgICAoY29uZAorICAgICAg ICAgICAgICAgKDs7IFRyeSB0byBub3QgZm9udGlmeSB0aGUgc2Vjb25kIGFuZCB0aGlyZCBjbGF1 c2VzIG9mCisJCTs7IGBmb3InIHN0YXRlbWVudHMgYXMgZGVjbGFyYXRpb25zLgorCQkoYW5kIChv ciAoZXEgKGNoYXItYmVmb3JlIG1hdGNoLXBvcykgP1w7KQorCQkJIChzYXZlLWV4Y3Vyc2lvbgor CQkJICAgOzsgQ2F0Y2ggdGhpbmdzIGxpa2UgZm9yKDsgKERXT1JEKShpbnQpIHggJgorCQkJICAg OzsgeTsgKSB3aXRob3V0IGludm9raW5nIHRoZSBmdWxsIG1pZ2h0IG9mCisJCQkgICA7OyBjLWJl Z2lubmluZy1vZi1zdGF0ZW1lbnQtMS4KKwkJCSAgIChnb3RvLWNoYXIgbWF0Y2gtcG9zKQorCQkJ ICAgKHdoaWxlIChlcSAoY2hhci1iZWZvcmUpID9cKSkKKwkJCSAgICAgKGMtZ28tbGlzdC1iYWNr d2FyZCkKKwkJCSAgICAgKGMtYmFja3dhcmQtc3ludGFjdGljLXdzKSkKKwkJCSAgIChlcSAoY2hh ci1iZWZvcmUpID9cOykpKQorCQkgICAgIAorICAgICAgICAgICAgICAgICAgICAgKHNldHEgcGFy ZW4tc3RhdGUgKGMtcGFyc2Utc3RhdGUpKQorICAgICAgICAgICAgICAgICAgICAgKHNldHEgbW9z dC1lbmNsb3NpbmctYnJhY2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChjLW1vc3QtZW5j bG9zaW5nLWJyYWNlIHBhcmVuLXN0YXRlKSkKKwkJICAgICAoZXEgKGNoYXItYWZ0ZXIgbW9zdC1l bmNsb3NpbmctYnJhY2UpID9cKCkpCisJCQorICAgICAgICAgICAgICAgIDs7IEFmdGVyIGEgIjsi IGluIGEgZm9yLWJsb2NrLiBBIGRlY2xhcmF0aW9uIGNhbiBuZXZlcgorICAgICAgICAgICAgICAg IDs7IGJlZ2luIGFmdGVyIGEgYDsnIGlmIHRoZSBtb3N0IGVuY2xvc2luZyBwYXJlbiBpcyBhCisg ICAgICAgICAgICAgICAgOzsgYCgnLgorCQkoc2V0cSBjb250ZXh0ICdhcmdsaXN0CisgICAgICAg ICAgICAgICAgICAgICAgYy1yZXN0cmljdGVkLTw+LWFyZ2xpc3RzIHQpKQorICAgICAgICAgICAg ICAgKChub3QgKG1lbXEgKGNoYXItYmVmb3JlIG1hdGNoLXBvcykgJyg/XCggPywgP1xbID88KSkp CiAJCSAgICAgKHNldHEgY29udGV4dCBuaWwKIAkJCSAgIGMtcmVzdHJpY3RlZC08Pi1hcmdsaXN0 cyBuaWwpKQogCQkgICAgOzsgQSBjb250cm9sIGZsb3cgZXhwcmVzc2lvbgpAQCAtMTI1Miw3ICsx Mjc2LDcgQEAKIAkJOzsgQXJlIHdlIGF0IGEgZGVjbGFyYXRvcj8gIFRyeSB0byBnbyBiYWNrIHRv IHRoZSBkZWNsYXJhdGlvbgogCQk7OyB0byBjaGVjayB0aGlzLiAgTm90ZSB0aGF0IGBjLWJlZ2lu bmluZy1vZi1kZWNsLTEnIGlzIHNsb3csCiAJCTs7IHNvIHdlIGNhY2hlIGl0cyByZXN1bHQgYmV0 d2VlbiBjYWxscy4KLQkJKGxldCAocGFyZW4tc3RhdGUgYm9kLXJlcyBlbmNsLXBvcyBpcy10eXBl ZGVmKQorCQkobGV0IChib2QtcmVzIGVuY2wtcG9zIGlzLXR5cGVkZWYpCiAJCSAgKGdvdG8tY2hh ciBzdGFydC1wb3MpCiAJCSAgKHNhdmUtZXhjdXJzaW9uCiAJCSAgICAodW5sZXNzIChhbmQgZGVj bC1zZWFyY2gtbGltCkBAIC0xMzE4LDIwICsxMzQyLDcgQEAKIAkJOzsgQmFjayB1cCB0byB0aGUg dHlwZSB0byBmb250aWZ5IHRoZSBkZWNsYXJhdG9yKHMpLgogCQkoZ290by1jaGFyIChjYXIgZGVj bC1vci1jYXN0KSkKIAotCQkobGV0ICgoZGVjbC1saXN0Ci0JCSAgICAgICAoaWYgY29udGV4dAot CQkJICAgOzsgU2hvdWxkIG5vcm1hbGx5IG5vdCBmb250aWZ5IGEgbGlzdCBvZgotCQkJICAgOzsg ZGVjbGFyYXRvcnMgaW5zaWRlIGFuIGFyZ2xpc3QsIGJ1dCB0aGUgZmlyc3QKLQkJCSAgIDs7IGFy Z3VtZW50IGluIHRoZSAnOycgc2VwYXJhdGVkIGxpc3Qgb2YgYSAiZm9yIgotCQkJICAgOzsgc3Rh dGVtZW50IGlzIGFuIGV4Y2VwdGlvbi4KLQkJCSAgICh3aGVuIChlcSAoY2hhci1iZWZvcmUgbWF0 Y2gtcG9zKSA/XCgpCi0JCQkgICAgIChzYXZlLWV4Y3Vyc2lvbgotCQkJICAgICAgIChnb3RvLWNo YXIgKDEtIG1hdGNoLXBvcykpCi0JCQkgICAgICAgKGMtYmFja3dhcmQtc3ludGFjdGljLXdzKQot CQkJICAgICAgIChhbmQgKGMtc2ltcGxlLXNraXAtc3ltYm9sLWJhY2t3YXJkKQotCQkJCSAgICAo bG9va2luZy1hdCBjLXBhcmVuLXN0bXQta2V5KSkpKQotCQkJIHQpKSkKLQorICAgICAgICAgICAg ICAgIChsZXQgKChkZWNsLWxpc3QgKG5vdCBjb250ZXh0KSkpCiAJCSAgOzsgRml4IHRoZSBgYy1k ZWNsLWlkLXN0YXJ0JyBvciBgYy1kZWNsLXR5cGUtc3RhcnQnIHByb3BlcnR5CiAJCSAgOzsgYmVm b3JlIHRoZSBmaXJzdCBkZWNsYXJhdG9yIGlmIGl0J3MgYSBsaXN0LgogCQkgIDs7IGBjLWZvbnQt bG9jay1kZWNsYXJhdG9ycycgaGFuZGxlcyB0aGUgcmVzdC4KCg== --0016e6509d4a2a4cf8049aba0d4f-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 26 01:18:50 2016 Received: (at 7918) by debbugs.gnu.org; 26 Feb 2016 06:18:50 +0000 Received: from localhost ([127.0.0.1]:46630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBjm-0008Cq-2A for submit@debbugs.gnu.org; Fri, 26 Feb 2016 01:18:50 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:33535) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBjk-0008Cj-8y for 7918@debbugs.gnu.org; Fri, 26 Feb 2016 01:18:48 -0500 Received: from [175.103.25.178] (helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aZBjH-00058A-Re; Fri, 26 Feb 2016 07:18:20 +0100 From: Lars Ingebrigtsen To: Daniel Colascione Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: Date: Fri, 26 Feb 2016 16:48:13 +1030 In-Reply-To: (Daniel Colascione's message of "Tue, 25 Jan 2011 22:36:22 -0800") Message-ID: <87k2lsuh96.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aZBjH-00058A-Re X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457072300.66328@TA3pAplEU8bdgV+YarT0AA X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 7918 Cc: bug-cc-mode@gnu.org, 7918@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: 0.0 (/) Daniel Colascione writes: > // This code has no variable declarations > > void foo() { > for (; (DWORD) a * b ;) > ; > > for (; a * b ;) > ; > } > I can confirm that the Emacs trunk still highlights the "a" in these examples wrong, and that Daniel's patch seems to fix the issue. However, I'm totally unfamiliar with the cc-mode code, so it would be nice if somebody could look at it before it's applied. === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2010-12-07 12:15:28 +0000 +++ lisp/progmodes/cc-fonts.el 2011-01-25 11:10:00 +0000 @@ -1080,7 +1080,8 @@ ;; o - '<> if the arglist is of angle bracket type; ;; o - 'arglist if it's some other arglist; ;; o - nil, if not in an arglist at all. This includes the - ;; parenthesised condition which follows "if", "while", etc. + ;; parenthesised condition which follows "if", "while", etc., + ;; but not "for", which is 'arglist after `;'. context ;; The position of the next token after the closing paren of ;; the last detected cast. @@ -1109,7 +1110,7 @@ ;; `c-forward-decl-or-cast-1' and `c-forward-label' for ;; later fontification. (c-record-type-identifiers t) - label-type + label-type paren-state most-enclosing-brace c-record-ref-identifiers ;; Make `c-forward-type' calls mark up template arglists if ;; it finds any. That's necessary so that we later will @@ -1171,7 +1172,6 @@ 'font-lock-function-name-face)))) (c-font-lock-function-postfix limit)) - (setq start-pos (point)) (when ;; The result of the `if' condition below is true when we don't recognize a @@ -1189,7 +1189,31 @@ ;; (e.g. "for ("). (let ((type (and (> match-pos (point-min)) (c-get-char-property (1- match-pos) 'c-type)))) - (cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<))) + (cond + (;; Try to not fontify the second and third clauses of + ;; `for' statements as declarations. + (and (or (eq (char-before match-pos) ?\;) + (save-excursion + ;; Catch things like for(; (DWORD)(int) x & + ;; y; ) without invoking the full might of + ;; c-beginning-of-statement-1. + (goto-char match-pos) + (while (eq (char-before) ?\)) + (c-go-list-backward) + (c-backward-syntactic-ws)) + (eq (char-before) ?\;))) + + (setq paren-state (c-parse-state)) + (setq most-enclosing-brace + (c-most-enclosing-brace paren-state)) + (eq (char-after most-enclosing-brace) ?\()) + + ;; After a ";" in a for-block. A declaration can never + ;; begin after a `;' if the most enclosing paren is a + ;; `('. + (setq context 'arglist + c-restricted-<>-arglists t)) + ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<))) (setq context nil c-restricted-<>-arglists nil)) ;; A control flow expression @@ -1252,7 +1276,7 @@ ;; Are we at a declarator? Try to go back to the declaration ;; to check this. Note that `c-beginning-of-decl-1' is slow, ;; so we cache its result between calls. - (let (paren-state bod-res encl-pos is-typedef) + (let (bod-res encl-pos is-typedef) (goto-char start-pos) (save-excursion (unless (and decl-search-lim @@ -1318,20 +1342,7 @@ ;; Back up to the type to fontify the declarator(s). (goto-char (car decl-or-cast)) - (let ((decl-list - (if context - ;; Should normally not fontify a list of - ;; declarators inside an arglist, but the first - ;; argument in the ';' separated list of a "for" - ;; statement is an exception. - (when (eq (char-before match-pos) ?\() - (save-excursion - (goto-char (1- match-pos)) - (c-backward-syntactic-ws) - (and (c-simple-skip-symbol-backward) - (looking-at c-paren-stmt-key)))) - t))) - + (let ((decl-list (not context))) ;; Fix the `c-decl-id-start' or `c-decl-type-start' property ;; before the first declarator if it's a list. ;; `c-font-lock-declarators' handles the rest. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 26 01:18:55 2016 Received: (at control) by debbugs.gnu.org; 26 Feb 2016 06:18:55 +0000 Received: from localhost ([127.0.0.1]:46633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBjr-0008D9-81 for submit@debbugs.gnu.org; Fri, 26 Feb 2016 01:18:55 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:33542) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBjp-0008D1-Lk for control@debbugs.gnu.org; Fri, 26 Feb 2016 01:18:53 -0500 Received: from [175.103.25.178] (helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aZBjS-00058L-EC for control@debbugs.gnu.org; Fri, 26 Feb 2016 07:18:31 +0100 Date: Fri, 26 Feb 2016 16:48:26 +1030 Message-Id: <87io1cuh8t.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #7918 X-MailScanner-ID: 1aZBjS-00058L-EC X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457072311.28775@quTY7ZN+qwshOY8yv3WAgg X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: 0.0 (/) tags 7918 confirmed From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 26 01:31:59 2016 Received: (at 7918) by debbugs.gnu.org; 26 Feb 2016 06:31:59 +0000 Received: from localhost ([127.0.0.1]:46672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBwU-0001kn-Qp for submit@debbugs.gnu.org; Fri, 26 Feb 2016 01:31:58 -0500 Received: from dancol.org ([96.126.100.184]:45892) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBwS-0001io-Ln for 7918@debbugs.gnu.org; Fri, 26 Feb 2016 01:31:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=O6jHkBbaudX6XjdtsyBKKNzLh279Oql4JRdz2k2/DWA=; b=lPvxa+E15Nflea73ZG2hRq+bf79h5PHJSN9bnN1RJxFHyz2glt/Mwy/KX8ArKBx9vWI4LsQXzxA8f1m8soLAtoTkisNSfvnfGI4Ib+qH7EV7KO19fD7rwWMD6RvW1Fl/6wKsgnsGnx8OBEBa6blJpnQ0Sev7R1amgJEquIcq1yXQOpu6ryuUuGpQgFY+Dv/W6r9u7oMd1U6Eh/13vAhUbAtNvhwNJt47ncACTPnwg2BX3IaDyr2FMs7jHmB9NW6tJNGZPpPPgrFC6yW52h0DQhuqXeu2HqndRetluQxCrUpW/OS3QkT9Ywdw8XFT+mmNu2HuTteWgETqJMcx5B4hew==; Received: from c-67-161-115-4.hsd1.wa.comcast.net ([67.161.115.4] helo=[192.168.1.210]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aZBwR-0005ab-V3; Thu, 25 Feb 2016 22:31:56 -0800 Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations To: Lars Ingebrigtsen , Daniel Colascione References: <87k2lsuh96.fsf@gnus.org> From: Daniel Colascione Message-ID: <56CFF157.50700@dancol.org> Date: Thu, 25 Feb 2016 22:31:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <87k2lsuh96.fsf@gnus.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hEiptgQkSSbOW4pDLtk0s5OxPu1jqNDli" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 7918 Cc: bug-cc-mode@gnu.org, 7918@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: -0.0 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hEiptgQkSSbOW4pDLtk0s5OxPu1jqNDli Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02/25/2016 10:18 PM, Lars Ingebrigtsen wrote: > + ;; After a ";" in a for-block. A declaration can never= > + ;; begin after a `;' if the most enclosing paren is a > + ;; `('.-declarators' handles the rest. Hrm. That's not true in general. Consider Java's try-with-resources construct: try (Foo foo =3D new Foo(); Bar bar =3D new Bar()) { ... } --hEiptgQkSSbOW4pDLtk0s5OxPu1jqNDli Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWz/FYAAoJEN4WImmbpWBl3/4QAJyEOzs3omJYWT2SuF2CTKwb I/ILvnyPP85nv9SQkDPwk2Z8yvXWUSD+XfbqsSaZWTRKzUSLREBsnnLea4xTaqBi Y9gPYlNDIgAj4cdmWTvUfvZDLwS2Mtr1hYDKGckSmTKUCK+gIVcVEgpnNTB05NA9 KrahVdtRz8pUsaBWJ8bc+G+Zmlq/v9bE4N1Fq4Wsy5C3Lw8aHobIXvSlmCMwL+sO GPAB/5PwTY2X5/wxH0ueYWTflm/cbpjXI73gFh1eNxJi+1XTqHDLWrrqfTNnOC9r 0n75zP1YHVJ4ZfxOvx01dHqL1+uQeFF7yI4YW4VVD0GCIQfGe1mxy2amZ8+q6psF IxBZE5etZ4U6yTW+XfQbLlyAFrAADN3H49lOJcScJKCSVUEDyFUtBMgq3DJip4nK h7zxjAOrcFfnZcUBOWSkmLSrmlADIbPTTHqyBon749TpMF9BUUGPAjeX1os3UcvE U23cmXIGuSYPhuFCg6N8yFNl7V3olvUA01BWz+mBSvpmJQLNdOENRBB0eve0SGt5 cuweokupDuI2TcnaZSvgJ4bVteNL2URkoVcdbmfUlI52b+ZNXXiMEKWiDFL3q3mx gu1RQjPRPeQITFNZ61+arNyL+jHwzJrTbJRH6C3G8i84ut/N4/f9VeLAVgfF1ICu H17Z1PZuxke5ocTDulCc =ZU6R -----END PGP SIGNATURE----- --hEiptgQkSSbOW4pDLtk0s5OxPu1jqNDli-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 26 01:33:10 2016 Received: (at 7918) by debbugs.gnu.org; 26 Feb 2016 06:33:10 +0000 Received: from localhost ([127.0.0.1]:46676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBxe-0001ro-3j for submit@debbugs.gnu.org; Fri, 26 Feb 2016 01:33:10 -0500 Received: from dancol.org ([96.126.100.184]:45902) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBxc-0001rh-VO for 7918@debbugs.gnu.org; Fri, 26 Feb 2016 01:33:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=HMJ8TyemfA5QRoUxbHKlEtAn5lxPFtq2wCxNFrogVpQ=; b=W7Om2vsk+MgqQDhv471O365FYH7Y58F64IymwLTOOPB5YnT9h+SLp/knCIVPetvxsEs6unO+4uI9d746NEHo5BACZjuIe3+aCFzRzpQ/87bqy2fTQoNKksM660toit8Qdyv80kq0nSivy8y5OzdBakBSMNKZd70W3CNbeeaTcE608OR3P7E/z4kU602NYlVoX0AR2tyxBUHSbiXKiXZtrufCO9l6m+8tkD2DTQYcyXVGe6BsR5I3Z7PDhvn/fpCADiALE+guAYFX7YVYaJUqOcD9ameBvr8gew92M/09gKHBhlrEeeNWMrj1VQSTwVRGgi3PlcFfbJ662Bu59hQFCw==; Received: from c-67-161-115-4.hsd1.wa.comcast.net ([67.161.115.4] helo=[192.168.1.210]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aZBxc-0005b7-I2; Thu, 25 Feb 2016 22:33:08 -0800 Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations To: Lars Ingebrigtsen , Daniel Colascione References: <87k2lsuh96.fsf@gnus.org> <56CFF157.50700@dancol.org> From: Daniel Colascione Message-ID: <56CFF1A2.4060506@dancol.org> Date: Thu, 25 Feb 2016 22:33:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56CFF157.50700@dancol.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LeRNQSnvaC3J5MB6nN3kwMnd3qAc1la3e" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 7918 Cc: bug-cc-mode@gnu.org, 7918@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: -0.0 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LeRNQSnvaC3J5MB6nN3kwMnd3qAc1la3e Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02/25/2016 10:31 PM, Daniel Colascione wrote: > On 02/25/2016 10:18 PM, Lars Ingebrigtsen wrote: >> + ;; After a ";" in a for-block. A declaration can neve= r >> + ;; begin after a `;' if the most enclosing paren is a= >> + ;; `('.-declarators' handles the rest. >=20 > Hrm. That's not true in general. Consider Java's try-with-resources > construct: >=20 > try (Foo foo =3D new Foo(); Bar bar =3D new Bar()) { ... } >=20 Gah, of course that's true in a `for' block specifically. --LeRNQSnvaC3J5MB6nN3kwMnd3qAc1la3e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWz/GiAAoJEN4WImmbpWBlcf0P/0PIxlPZv5obeGR04r50vzLh v1fVv9GRtCfCXx63zkadqDKoH1DW4818TVbYU8+f3mtpIm45szts70Bxwgd//9vZ zZG3IOwAKUfGWHFUJ/Q6lomk/Htnp3jP8rEHOICgRYTATbdsQ0HSOXf1iicDxhj7 K26EHgLNuuFQn0/1UyG/K2HJ2xmp5MPUrboiG1uD+KqlYcKObWexoz0PYa5N0+Yc SpSX7KWLJHYwXWu7QTleyFc1HD1GQuULJzLlRiKVeemNvQYaex1a8mF2mpLYe5oa Z4TwOUt1PXV3BlOlZnKmy1jy88UtpgXQRrOcwWIQTbAZPWqjkAwr4LT+flTXfMtV hLCLI487iU+m4gF/OjMa2MzYzBd0g6mZB+I8mYpJZOvXyQKf+MWfsmIrLV5/9ebV JDpTVvvznooMzb46xw7/e1WIN5C5iXOX3MZEnEdf/JlDkCiQS4WG649eZ87xoAQy tilkA3ZGYhzgJ9t4r9rnVn1pvsH6p2vQL48b+Ho+HvPIbL4r3cNfE1YvbNppyP8W ZxVRUqibgOg9R5hex+Mmbd174+bn1eq4IHIWVqTF/kn+cfFLgJ1cq7gxWWekV3nf /aznnOY0QzI9NCqPG0AO6KKlqzRkLDEXX9pf9gbGDQrJPIgAokx1S9RRCoVO2QcJ zT05lXkzTF2aWmx3FKtu =Eqgl -----END PGP SIGNATURE----- --LeRNQSnvaC3J5MB6nN3kwMnd3qAc1la3e-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 13:00:14 2016 Received: (at 7918) by debbugs.gnu.org; 1 Mar 2016 18:00:14 +0000 Received: from localhost ([127.0.0.1]:56627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaoak-0001Eu-BM for submit@debbugs.gnu.org; Tue, 01 Mar 2016 13:00:14 -0500 Received: from mail.muc.de ([193.149.48.3]:20316) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaoai-0001El-Bi for 7918@debbugs.gnu.org; Tue, 01 Mar 2016 13:00:13 -0500 Received: (qmail 73417 invoked by uid 3782); 1 Mar 2016 18:00:10 -0000 Received: from acm.muc.de (p548A401F.dip0.t-ipconnect.de [84.138.64.31]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 01 Mar 2016 19:00:09 +0100 Received: (qmail 6889 invoked by uid 1000); 1 Mar 2016 18:02:42 -0000 Date: Tue, 1 Mar 2016 18:02:42 +0000 To: Daniel Colascione , Lars Ingebrigtsen Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Message-ID: <20160301180242.GA6494@acm.fritz.box> References: <87k2lsuh96.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k2lsuh96.fsf@gnus.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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: 7918 Cc: 7918@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: -0.0 (/) Hello, Daniel and Lars. On Fri, Feb 26, 2016 at 04:48:13PM +1030, Lars Ingebrigtsen wrote: > Daniel Colascione writes: > > // This code has no variable declarations > > > > void foo() { > > for (; (DWORD) a * b ;) > > ; > > > > for (; a * b ;) > > ; > > } > > > I can confirm that the Emacs trunk still highlights the "a" in these > examples wrong, and that Daniel's patch seems to fix the issue. > However, I'm totally unfamiliar with the cc-mode code, so it would be > nice if somebody could look at it before it's applied. OK. I haven't actually tried this patch out, but there are things in it I find concerning. > === modified file 'lisp/progmodes/cc-fonts.el' > --- lisp/progmodes/cc-fonts.el 2010-12-07 12:15:28 +0000 > +++ lisp/progmodes/cc-fonts.el 2011-01-25 11:10:00 +0000 > @@ -1080,7 +1080,8 @@ > ;; o - '<> if the arglist is of angle bracket type; > ;; o - 'arglist if it's some other arglist; > ;; o - nil, if not in an arglist at all. This includes the > - ;; parenthesised condition which follows "if", "while", etc. > + ;; parenthesised condition which follows "if", "while", etc., > + ;; but not "for", which is 'arglist after `;'. By what logic is `context' set to 'arglist in a "for" statement? The main function of `context' is to inform `c-forward-decl-or-cast-1' of the context in which it is being called. > context > ;; The position of the next token after the closing paren of > ;; the last detected cast. > @@ -1109,7 +1110,7 @@ > ;; `c-forward-decl-or-cast-1' and `c-forward-label' for > ;; later fontification. > (c-record-type-identifiers t) > - label-type > + label-type paren-state most-enclosing-brace > c-record-ref-identifiers > ;; Make `c-forward-type' calls mark up template arglists if > ;; it finds any. That's necessary so that we later will > @@ -1171,7 +1172,6 @@ > 'font-lock-function-name-face)))) > (c-font-lock-function-postfix limit)) > - > (setq start-pos (point)) > (when > ;; The result of the `if' condition below is true when we don't recognize a The next hunk attempts to move the detection of a "for" statement here from later in the function where it previously was. Why? > @@ -1189,7 +1189,31 @@ > ;; (e.g. "for ("). > (let ((type (and (> match-pos (point-min)) > (c-get-char-property (1- match-pos) 'c-type)))) > - (cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<))) > + (cond > + (;; Try to not fontify the second and third clauses of > + ;; `for' statements as declarations. > + (and (or (eq (char-before match-pos) ?\;) > + (save-excursion > + ;; Catch things like for(; (DWORD)(int) x & > + ;; y; ) without invoking the full might of > + ;; c-beginning-of-statement-1. > + (goto-char match-pos) > + (while (eq (char-before) ?\)) > + (c-go-list-backward) > + (c-backward-syntactic-ws)) Here we potentially have an infinite loop when there's an unbalanced ")" in the code. It's critical to check the return from `c-go-list-backward' here, too. > + (eq (char-before) ?\;))) > + > + (setq paren-state (c-parse-state)) > + (setq most-enclosing-brace > + (c-most-enclosing-brace paren-state)) > + (eq (char-after most-enclosing-brace) ?\()) Rather than using `c-parse-state', this could be done more efficiently with `c-up-list-backward'. There may be the possibility of an error here if `c-most-enclosing-brace' returns nil, leading to (char-after nil), but maybe that can't happen. It would certainly be a good idea to check for it, though. > + > + ;; After a ";" in a for-block. A declaration can never > + ;; begin after a `;' if the most enclosing paren is a > + ;; `('. How do we know we're in a "for" block here? There is no `looking-at' check with the pertinent regexp (c-paren-stmt-key). > + (setq context 'arglist > + c-restricted-<>-arglists t)) Again, why is `context' set to 'arglist here? What effect is this intended to have on `c-forward-decl-or-cast-1'? > + ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<))) > (setq context nil > c-restricted-<>-arglists nil)) > ;; A control flow expression > @@ -1252,7 +1276,7 @@ > ;; Are we at a declarator? Try to go back to the declaration > ;; to check this. Note that `c-beginning-of-decl-1' is slow, > ;; so we cache its result between calls. > - (let (paren-state bod-res encl-pos is-typedef) > + (let (bod-res encl-pos is-typedef) > (goto-char start-pos) > (save-excursion > (unless (and decl-search-lim > @@ -1318,20 +1342,7 @@ > ;; Back up to the type to fontify the declarator(s). > (goto-char (car decl-or-cast)) > - (let ((decl-list > - (if context > - ;; Should normally not fontify a list of > - ;; declarators inside an arglist, but the first > - ;; argument in the ';' separated list of a "for" > - ;; statement is an exception. > - (when (eq (char-before match-pos) ?\() > - (save-excursion > - (goto-char (1- match-pos)) > - (c-backward-syntactic-ws) > - (and (c-simple-skip-symbol-backward) > - (looking-at c-paren-stmt-key)))) > - t))) > - > + (let ((decl-list (not context))) Here the setting of decl-list is changed. Why? `decl-list''s purpose is to instruct `c-font-lock-declarators' whether to fontify just one declarator or a whole list of them. The existing logic is to fontify all the declarators in a "for" block, whereas after the patch only the first one would be fontified. Again, why? > ;; Fix the `c-decl-id-start' or `c-decl-type-start' property > ;; before the first declarator if it's a list. > ;; `c-font-lock-declarators' handles the rest. Question (for Daniel): has this patch been run through the CC Mode test suite, yet? > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 13:05:57 2016 Received: (at 7918) by debbugs.gnu.org; 1 Mar 2016 18:05:57 +0000 Received: from localhost ([127.0.0.1]:56646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaogH-0001hY-Fu for submit@debbugs.gnu.org; Tue, 01 Mar 2016 13:05:57 -0500 Received: from dancol.org ([96.126.100.184]:34226) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaogF-0001hP-Sz for 7918@debbugs.gnu.org; Tue, 01 Mar 2016 13:05:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=2ewgsoiSgf+tZy4LmRW5J8U5LhvRKiZx9jbaCFagC/c=; b=rUMy4UcQ4qr1uxQZ9xVPHpAPmtGACxfn1Jo9VdZqb2Ge/FJOWC+7FHoD7Ow5xweMsrPg0EW6+X7NqRZXjRJ8fBEFRzyXPSg58y5l2RvAZpGRoh3geeRnkMWXFfRlllLb0+i3Hs3lEkj1LRF4q5cu3QVqnIBDIi+v1Y/LIpMQQf5LjqRoBdOIUYIjB9Ch/PfbsTsrABS22x/PuxMQowz9sR2Utbzrgp2F6rWieDiQjc449uo0lKk1mU1Zy+hfkQ1pkngd5EUcXnzU6JMWpcQGimwrkp/30CGd6nYh4rbrKyN2nr7EDUxodmas/tXiyWTX6PwHDU45P3o9sDtPbiLH9A==; Received: from [2620:10d:c090:180::1:ab21] (helo=[IPv6:2620:10d:c081:1103:2ab2:bdff:fe1c:db58]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aaogD-00047y-Gr; Tue, 01 Mar 2016 10:05:53 -0800 Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations To: Alan Mackenzie , Daniel Colascione , Lars Ingebrigtsen References: <87k2lsuh96.fsf@gnus.org> <20160301180242.GA6494@acm.fritz.box> From: Daniel Colascione Message-ID: <56D5D9FB.2060605@dancol.org> Date: Tue, 1 Mar 2016 10:05:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160301180242.GA6494@acm.fritz.box> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NvtM4XpaobQad1NKvQAmUaKoucx85uD7O" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 7918 Cc: 7918@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: 0.0 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NvtM4XpaobQad1NKvQAmUaKoucx85uD7O Content-Type: multipart/mixed; boundary="dQ76rfjFgvElWgpjSWFHPgCDeXlvugKIo" From: Daniel Colascione To: Alan Mackenzie , Daniel Colascione , Lars Ingebrigtsen Cc: 7918@debbugs.gnu.org Message-ID: <56D5D9FB.2060605@dancol.org> Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: <87k2lsuh96.fsf@gnus.org> <20160301180242.GA6494@acm.fritz.box> In-Reply-To: <20160301180242.GA6494@acm.fritz.box> --dQ76rfjFgvElWgpjSWFHPgCDeXlvugKIo Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 03/01/2016 10:02 AM, Alan Mackenzie wrote: > Hello, Daniel and Lars. >=20 > On Fri, Feb 26, 2016 at 04:48:13PM +1030, Lars Ingebrigtsen wrote: >> Daniel Colascione writes: >=20 >>> // This code has no variable declarations >>> >>> void foo() { >>> for (; (DWORD) a * b ;) >>> ; >>> >>> for (; a * b ;) >>> ; >>> } >>> >=20 >> I can confirm that the Emacs trunk still highlights the "a" in these >> examples wrong, and that Daniel's patch seems to fix the issue. >> However, I'm totally unfamiliar with the cc-mode code, so it would be >> nice if somebody could look at it before it's applied. >=20 > OK. I haven't actually tried this patch out, but there are things in i= t > I find concerning. >=20 >> =3D=3D=3D modified file 'lisp/progmodes/cc-fonts.el' >> --- lisp/progmodes/cc-fonts.el 2010-12-07 12:15:28 +0000 >> +++ lisp/progmodes/cc-fonts.el 2011-01-25 11:10:00 +0000 >> @@ -1080,7 +1080,8 @@ >> ;; o - '<> if the arglist is of angle bracket type; >> ;; o - 'arglist if it's some other arglist; >> ;; o - nil, if not in an arglist at all. This includes the >> - ;; parenthesised condition which follows "if", "while", etc. >> + ;; parenthesised condition which follows "if", "while", etc., >> + ;; but not "for", which is 'arglist after `;'. >=20 > By what logic is `context' set to 'arglist in a "for" statement? The > main function of `context' is to inform `c-forward-decl-or-cast-1' of > the context in which it is being called. >=20 >> context >> ;; The position of the next token after the closing paren of >> ;; the last detected cast. >> @@ -1109,7 +1110,7 @@ >> ;; `c-forward-decl-or-cast-1' and `c-forward-label' for >> ;; later fontification. >> (c-record-type-identifiers t) >> - label-type >> + label-type paren-state most-enclosing-brace >> c-record-ref-identifiers >> ;; Make `c-forward-type' calls mark up template arglists if >> ;; it finds any. That's necessary so that we later will >> @@ -1171,7 +1172,6 @@ >> 'font-lock-function-name-face)))) >> (c-font-lock-function-postfix limit)) > =20 >> - =20 >> (setq start-pos (point)) >> (when >> ;; The result of the `if' condition below is true when we don't= recognize a >=20 > The next hunk attempts to move the detection of a "for" statement here > from later in the function where it previously was. Why? >=20 >> @@ -1189,7 +1189,31 @@ >> ;; (e.g. "for ("). >> (let ((type (and (> match-pos (point-min)) >> (c-get-char-property (1- match-pos) 'c-type)))) >> - (cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<))) >> + (cond >> + (;; Try to not fontify the second and third clauses of= >> + ;; `for' statements as declarations. >> + (and (or (eq (char-before match-pos) ?\;) >> + (save-excursion >> + ;; Catch things like for(; (DWORD)(int) x & >> + ;; y; ) without invoking the full might of >> + ;; c-beginning-of-statement-1. >> + (goto-char match-pos) >> + (while (eq (char-before) ?\)) >> + (c-go-list-backward) >> + (c-backward-syntactic-ws)) >=20 > Here we potentially have an infinite loop when there's an unbalanced ")= " > in the code. It's critical to check the return from > `c-go-list-backward' here, too. >=20 >> + (eq (char-before) ?\;))) >> + =20 >> + (setq paren-state (c-parse-state)) >> + (setq most-enclosing-brace >> + (c-most-enclosing-brace paren-state)) >> + (eq (char-after most-enclosing-brace) ?\()) >=20 > Rather than using `c-parse-state', this could be done more efficiently > with `c-up-list-backward'. There may be the possibility of an error > here if `c-most-enclosing-brace' returns nil, leading to (char-after > nil), but maybe that can't happen. It would certainly be a good idea t= o > check for it, though. >=20 >> + =09 >> + ;; After a ";" in a for-block. A declaration can neve= r >> + ;; begin after a `;' if the most enclosing paren is a= >> + ;; `('. >=20 > How do we know we're in a "for" block here? There is no `looking-at' > check with the pertinent regexp (c-paren-stmt-key). >=20 >> + (setq context 'arglist >> + c-restricted-<>-arglists t)) >=20 > Again, why is `context' set to 'arglist here? What effect is this > intended to have on `c-forward-decl-or-cast-1'? >=20 >> + ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<)))= >> (setq context nil >> c-restricted-<>-arglists nil)) >> ;; A control flow expression >> @@ -1252,7 +1276,7 @@ >> ;; Are we at a declarator? Try to go back to the declaration >> ;; to check this. Note that `c-beginning-of-decl-1' is slow, >> ;; so we cache its result between calls. >> - (let (paren-state bod-res encl-pos is-typedef) >> + (let (bod-res encl-pos is-typedef) >> (goto-char start-pos) >> (save-excursion >> (unless (and decl-search-lim >> @@ -1318,20 +1342,7 @@ >> ;; Back up to the type to fontify the declarator(s). >> (goto-char (car decl-or-cast)) > =20 >> - (let ((decl-list >> - (if context >> - ;; Should normally not fontify a list of >> - ;; declarators inside an arglist, but the first >> - ;; argument in the ';' separated list of a "for" >> - ;; statement is an exception. >> - (when (eq (char-before match-pos) ?\() >> - (save-excursion >> - (goto-char (1- match-pos)) >> - (c-backward-syntactic-ws) >> - (and (c-simple-skip-symbol-backward) >> - (looking-at c-paren-stmt-key)))) >> - t))) >> - >> + (let ((decl-list (not context))) >=20 > Here the setting of decl-list is changed. Why? `decl-list''s purpose > is to instruct `c-font-lock-declarators' whether to fontify just one > declarator or a whole list of them. The existing logic is to fontify > all the declarators in a "for" block, whereas after the patch only the > first one would be fontified. Again, why? >=20 >> ;; Fix the `c-decl-id-start' or `c-decl-type-start' property >> ;; before the first declarator if it's a list. >> ;; `c-font-lock-declarators' handles the rest. >=20 > Question (for Daniel): has this patch been run through the CC Mode test= > suite, yet? It has not. It's been years since I even thought about that code. If you're up for it, I'd rather you supply a separate fix. --dQ76rfjFgvElWgpjSWFHPgCDeXlvugKIo-- --NvtM4XpaobQad1NKvQAmUaKoucx85uD7O Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW1dn7AAoJEN4WImmbpWBllTgQAJdL82VguoGrU/9W5criX8wH 06Ku8/5waccnefy5g4UBLTaRRwbUDB+E9vsPwOVgpcbN+WUL3GpJQbOb3hpsUDtl cJTuUbPsrtR79fIvYB8WOD0a68tI9ED6cv09U1bXcu3swE/WTiyD8KDHOQfB4CBa dlK1P6fOsGa3WWLy3JCy1OV4/7flD7jtGMuGkSJ3/odxU21n8gtgbweTdpLdRM4u CcViwV7M0YVKd6A1ngWlkZdsaN4jzIQp3qgXAf5CFl/M/CiT7tM+OVsapkPPzrJY Fh24wjnhd2moRkgrXEQChl16C8t8K89Hj+MildDjLWquwKpYskZmJzKFDSm8JlPF YhCNHZ8VHR0HTZX6Fr5+TRvmpP0advoxjLz01OWp+oOyHnTcIZ/iMM8/PeBtL0cZ w7yv98t1MiJ2jN2OCkDFnmmsSIEGfqq742vYAtogrRwxJLcjXxx2fAcf7GE2+3CW Zqk7sjLiHn2N8F1if/J/wBeI58MfkRBpdvwRbzUl8Ml1/tLiaqxxdGvUAsZVo+79 NEb+iOekvMadrtuC5fs1+howf8ehpkykqTKGuZSHZfg9Gmj7jNuzsHZrbUjTW7OB pL+9+aAuS7xM/dX3Ykp74H3URc+aty4GBkjqxdNIJD2sSMYxs/lXyx1OmUZWNtT7 NibRDNyCpanb82qz0Dw5 =TsjB -----END PGP SIGNATURE----- --NvtM4XpaobQad1NKvQAmUaKoucx85uD7O-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 12:15:27 2016 Received: (at 7918) by debbugs.gnu.org; 1 Apr 2016 16:15:27 +0000 Received: from localhost ([127.0.0.1]:47502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am1jL-00041z-BK for submit@debbugs.gnu.org; Fri, 01 Apr 2016 12:15:27 -0400 Received: from mail.muc.de ([193.149.48.3]:60008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am1jJ-00041q-NE for 7918@debbugs.gnu.org; Fri, 01 Apr 2016 12:15:26 -0400 Received: (qmail 99915 invoked by uid 3782); 1 Apr 2016 16:15:24 -0000 Received: from acm.muc.de (p548A4E91.dip0.t-ipconnect.de [84.138.78.145]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 01 Apr 2016 18:15:22 +0200 Received: (qmail 6015 invoked by uid 1000); 1 Apr 2016 16:18:19 -0000 Date: Fri, 1 Apr 2016 16:18:19 +0000 To: Daniel Colascione Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Message-ID: <20160401161819.GA3299@acm.fritz.box> References: <87k2lsuh96.fsf@gnus.org> <20160301180242.GA6494@acm.fritz.box> <56D5D9FB.2060605@dancol.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56D5D9FB.2060605@dancol.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 7918 Cc: 7918@debbugs.gnu.org, Lars Ingebrigtsen 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, Daniel. On Tue, Mar 01, 2016 at 10:05:47AM -0800, Daniel Colascione wrote: > On 03/01/2016 10:02 AM, Alan Mackenzie wrote: > > On Fri, Feb 26, 2016 at 04:48:13PM +1030, Lars Ingebrigtsen wrote: > >> Daniel Colascione writes: > >>> // This code has no variable declarations > >>> void foo() { > >>> for (; (DWORD) a * b ;) > >>> ; > >>> for (; a * b ;) > >>> ; > >>> } > It's been years since I even thought about that code. If you're up for > it, I'd rather you supply a separate fix. OK, here goes: diff -r f19a4ffb060b cc-fonts.el --- a/cc-fonts.el Fri Apr 01 12:23:17 2016 +0000 +++ b/cc-fonts.el Fri Apr 01 16:10:57 2016 +0000 @@ -1206,8 +1206,20 @@ 'font-lock-keyword-face) (looking-at c-not-decl-init-keywords)) (and c-macro-with-semi-re - (looking-at c-macro-with-semi-re))) ; 2008-11-04 - ;; Don't do anything more if we're looking at a keyword that + (looking-at c-macro-with-semi-re)) ; 2008-11-04 + (save-excursion ; A construct after a ; in a `for' statement + ; can't be a declaration. + (and (c-go-up-list-backward) + (eq (char-after) ?\() + (progn (c-backward-syntactic-ws) + (c-simple-skip-symbol-backward)) + (looking-at c-paren-stmt-key) + (progn (goto-char match-pos) + (while (and (eq (char-before) ?\)) + (c-go-list-backward)) + (c-backward-syntactic-ws)) + (eq (char-before) ?\;))))) + ;; Don't do anything more if we're looking at something that ;; can't start a declaration. t Could you do the usual with this patch, please, then if everything's OK, I can commit it to the emacs-25 branch. Thanks! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 14:08:10 2016 Received: (at 7918-done) by debbugs.gnu.org; 25 Apr 2016 18:08:10 +0000 Received: from localhost ([127.0.0.1]:46855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aukvZ-0005mP-UK for submit@debbugs.gnu.org; Mon, 25 Apr 2016 14:08:10 -0400 Received: from mail.muc.de ([193.149.48.3]:36225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aukvY-0005mH-Bo for 7918-done@debbugs.gnu.org; Mon, 25 Apr 2016 14:08:08 -0400 Received: (qmail 87091 invoked by uid 3782); 25 Apr 2016 18:08:07 -0000 Received: from acm.muc.de (p548A5E62.dip0.t-ipconnect.de [84.138.94.98]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 25 Apr 2016 20:08:06 +0200 Received: (qmail 17483 invoked by uid 1000); 25 Apr 2016 18:04:30 -0000 Date: Mon, 25 Apr 2016 18:04:30 +0000 To: 7918-done@debbugs.gnu.org Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Message-ID: <20160425180430.GC4020@acm.fritz.box> References: <87k2lsuh96.fsf@gnus.org> <20160301180242.GA6494@acm.fritz.box> <56D5D9FB.2060605@dancol.org> <20160401161819.GA3299@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160401161819.GA3299@acm.fritz.box> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 7918-done Cc: Lars Ingebrigtsen , Daniel Colascione 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 (-) Bug fixed in master branch. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Aug 16 11:12:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Tue, 10 May 2016 14:50:01 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 28 21:05:41 2017 Received: (at 7918) by debbugs.gnu.org; 29 Jun 2017 01:05:41 +0000 Received: from localhost ([127.0.0.1]:43185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQNtp-0002xT-Sr for submit@debbugs.gnu.org; Wed, 28 Jun 2017 21:05:41 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:34120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQNth-0002x1-2V; Wed, 28 Jun 2017 21:05:32 -0400 Received: by mail-io0-f170.google.com with SMTP id r36so45479561ioi.1; Wed, 28 Jun 2017 18:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=pRq/DzoxXhj8PBYbzPlnkhbcpw+1E/CEXQjmvxBbc6c=; b=rs6A0Zq6ag43VyuUkf+kawP2c4Dbg/wJFVXfEitF9O6pfhYvE2tgVCWf28c21JWtTI R5qGTM6V06BIYFRg0zc3nsxkVaNtRs84WsXdwOA2sFil7tcTosDcbjm2K+aIwg0Sztor BV9NvKL+WXyO+bb22ljEO/U6TEe8+X52VcdPVYX1Ljcp09JnD4oGhG5YsVJwcICjLJTb ULAiUtZbKyipaSjGs80vfFLv77P7yqCvJPeULehAxoipGpu1KvpnR8dHTC4139B68qmr u/0dmFIIQJ3k73i+2wWoy1zj5CilPJyL+ldZwh+aTBZrJs9ApL21HWbl3J6W63CFqqF7 1hZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=pRq/DzoxXhj8PBYbzPlnkhbcpw+1E/CEXQjmvxBbc6c=; b=Oo7m2LhBubarX9skhfjqkQFZPYRDi2wYtcD6ovjUM7uiLUKGWtCfgcZpi8g4VIqldD Wd55Egpll9wibSMCyIl2BOrRn8J9HR33e7rhKrybaFrcjXwXMWjHrNSYs1zoD5dvEXtg xIOtA5h5mLcm7klRfi3zsLJv381/eHk9hCFBGo9Ml57goXTqNST0RtReJnyuV7DZw+/c kgAboUDnXEw7PooXwn4FoNwyIw/z6ZSBFMM81ztgm+lGOQD3+yHO+OQcQ9QjX0xP18yd tW4dAL1SJW9mXx20R9/tI6AeVeF9Bd7IHNiF59i8r+n6Jdgrta/hxqcLrhOLZK+O2qEs 7isQ== X-Gm-Message-State: AKS2vOwAaRbycsdz0G0SSTiVtOT8QYVnHyxLkOduFNhGRMx2RUSFtDWW jX6ZFxnuJjejHD38 X-Received: by 10.107.180.5 with SMTP id d5mr14603862iof.56.1498698323641; Wed, 28 Jun 2017 18:05:23 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id s135sm3904014ita.2.2017.06.28.18.05.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2017 18:05:22 -0700 (PDT) From: npostavs@users.sourceforge.net To: 7918@debbugs.gnu.org Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: <20160425180430.GC4020@acm.fritz.box> Date: Wed, 28 Jun 2017 21:06:59 -0400 In-Reply-To: (GNU bug Tracking System's message of "Mon, 25 Apr 2016 18:09:02 +0000") Message-ID: <87lgobmwjw.fsf_-_@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7918 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.1 (--) found 7918 25.2 severity 7918 minor tags 7918 fixed close 7918 26.1 quit > From: Alan Mackenzie > Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations > To: 7918-done@debbugs.gnu.org, 7918@debbugs.gnu.org > Cc: Lars Ingebrigtsen , Daniel Colascione > Date: Mon, 25 Apr 2016 18:04:30 +0000 (1 year, 9 weeks, 1 day ago) > > Bug fixed in master branch. I can confirm it's fixed in master (I wonder why the bug was reopened, apparently automatically?) From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 03 15:09:21 2017 Received: (at 7918) by debbugs.gnu.org; 3 Jul 2017 19:09:22 +0000 Received: from localhost ([127.0.0.1]:50733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS6in-0001QU-PO for submit@debbugs.gnu.org; Mon, 03 Jul 2017 15:09:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS6im-0001QI-4X for 7918@debbugs.gnu.org; Mon, 03 Jul 2017 15:09:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dS6ig-0003eB-3d for 7918@debbugs.gnu.org; Mon, 03 Jul 2017 15:09:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS6iV-0003Xw-2M; Mon, 03 Jul 2017 15:09:03 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1dS6iT-000780-7r; Mon, 03 Jul 2017 15:09:01 -0400 From: Glenn Morris To: npostavs@users.sourceforge.net Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> X-Spook: Verisign JSOFC3IP Response Drug trade Tamil Tigers Ft. X-Ran: -!+"/%Dqh>5*}iYxj^-v,]-;~+aF;kX~;m"Tc%@lBsYWext0B&eZ$fH%.kgLMK%P,7lUrf X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 03 Jul 2017 15:09:01 -0400 In-Reply-To: <87lgobmwjw.fsf_-_@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Wed, 28 Jun 2017 21:06:59 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 7918 Cc: 7918@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: -5.0 (-----) npostavs@users.sourceforge.net wrote: >> Bug fixed in master branch. > > I can confirm it's fixed in master (I wonder why the bug was reopened, > apparently automatically?) Nothing gets reopened automatically. I agree that sometimes debbugs doesn't report the details of control requests in an informative way. In this case, the bug was reopened in May 2016 (by Alan, from internal logs). You'd have to ask him why. http://lists.gnu.org/archive/html/emacs-bug-tracker/2016-05/msg00126.html From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 03 15:44:32 2017 Received: (at 7918) by debbugs.gnu.org; 3 Jul 2017 19:44:32 +0000 Received: from localhost ([127.0.0.1]:50761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS7Gp-0002FR-PC for submit@debbugs.gnu.org; Mon, 03 Jul 2017 15:44:31 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:36025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS7Go-0002FE-1M for 7918@debbugs.gnu.org; Mon, 03 Jul 2017 15:44:30 -0400 Received: by mail-it0-f44.google.com with SMTP id m68so92343233ith.1 for <7918@debbugs.gnu.org>; Mon, 03 Jul 2017 12:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XwizjMzeUYq3U06USsKigidUPdie9/IIkAiu9pmkslA=; b=UfrVa7XK70Yw/ZhqEzEXbE7/UL2rL3vs7KeriFVg1xws6g0o2vr+5gkTfuyc6TTdVJ FBmj4gN1CJCARB7kVMmN7Qfu8/f9s+pRlLoaCJZIWhWV5ehgKgrnAOmRilZ1ubE8mgMl 6xW1vvWUPCB0N1soOhfb5JoaWAkx3OwC8+Se40PnElo3oWc0/LX/AVgp8xQYNiaQIFS5 kgPgb684hOCASwP+GCu+o+9cvEWm91PfhkYZLwpyaJLUgOdc+LUbOgdP3PJQQZPFc2BW fhB+OFbPo50vAxRPboSbYEb+7D6zFXRGJHh6UBgA/Edp5dvWDwyNIDbZjh+whZh+GFwv tmAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=XwizjMzeUYq3U06USsKigidUPdie9/IIkAiu9pmkslA=; b=CHDFQnAfm1ieyUggR3b7BTZY3rD284k1vKKIzYhOSHk70NoN0p1BUnX4GQEnYaCPKL z4EnTe8JkHoD7ThNuVqaroyS3e4kXnSUtfgiL74TuELhdVQ6gUrMK9C6wfGRAeUOgqc8 LyjaUozINfjyuTVE8Kr995/ogW9tFVKlktnqfdKc/hoPmOxe3MYaVvAR2oActeE37rwJ JQKsDvwmyaoAlchykjXWL9wtWiF+/2pqDNyNEry9Z/DSLWM9DMzEdz1+9EzdncIhflUd XomuL2CYxTbGllmG8NnQj76wWqTAbhcADfGxNAAhqBdaobL1rrVMv1o8/Adv0M35vOvG BsPg== X-Gm-Message-State: AIVw113e2mWDmdneLgy70qhrvraedLPggIPOx+0+MIDiTVNijGUTW68D 3jjP4bJY6Le5SFwd X-Received: by 10.36.48.146 with SMTP id q140mr10245357itq.59.1499111064381; Mon, 03 Jul 2017 12:44:24 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id w199sm8631517iod.15.2017.07.03.12.44.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jul 2017 12:44:23 -0700 (PDT) From: npostavs@users.sourceforge.net To: Glenn Morris Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> Date: Mon, 03 Jul 2017 15:46:00 -0400 In-Reply-To: (Glenn Morris's message of "Mon, 03 Jul 2017 15:09:01 -0400") Message-ID: <87mv8li9s7.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 7918 Cc: 7918@debbugs.gnu.org, Alan Mackenzie 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: 0.7 (/) Glenn Morris writes: > npostavs@users.sourceforge.net wrote: > >>> Bug fixed in master branch. >> >> I can confirm it's fixed in master (I wonder why the bug was reopened, >> apparently automatically?) > > Nothing gets reopened automatically. I agree that sometimes debbugs > doesn't report the details of control requests in an informative way. > In this case, the bug was reopened in May 2016 (by Alan, from internal > logs). You'd have to ask him why. > > http://lists.gnu.org/archive/html/emacs-bug-tracker/2016-05/msg00126.html Oh, I was looking at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7918;msg=32. So all those "fake control message" things are just the original control request getting lost somehow? Ccing Alan, please reopen if I made a mistake by closing this. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 03 16:19:24 2017 Received: (at 7918) by debbugs.gnu.org; 3 Jul 2017 20:19:24 +0000 Received: from localhost ([127.0.0.1]:50802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS7oa-00038v-Ci for submit@debbugs.gnu.org; Mon, 03 Jul 2017 16:19:24 -0400 Received: from ocolin.muc.de ([193.149.48.4]:46248 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1dS7oZ-00038l-09 for 7918@debbugs.gnu.org; Mon, 03 Jul 2017 16:19:23 -0400 Received: (qmail 95594 invoked by uid 3782); 3 Jul 2017 20:19:20 -0000 Received: from acm.muc.de (p548C7CA1.dip0.t-ipconnect.de [84.140.124.161]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 03 Jul 2017 22:19:19 +0200 Received: (qmail 4308 invoked by uid 1000); 3 Jul 2017 20:18:08 -0000 Date: Mon, 3 Jul 2017 20:18:08 +0000 To: npostavs@users.sourceforge.net Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Message-ID: <20170703201808.GA3875@acm> References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> <87mv8li9s7.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mv8li9s7.fsf@users.sourceforge.net> User-Agent: Mutt/1.7.2 (2016-11-26) 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: 7918 Cc: Glenn Morris , 7918@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: -0.0 (/) Hello, Noam and Glenn. On Mon, Jul 03, 2017 at 15:46:00 -0400, npostavs@users.sourceforge.net wrote: > Glenn Morris writes: > > npostavs@users.sourceforge.net wrote: > >>> Bug fixed in master branch. > >> I can confirm it's fixed in master (I wonder why the bug was reopened, > >> apparently automatically?) > > Nothing gets reopened automatically. I agree that sometimes debbugs > > doesn't report the details of control requests in an informative way. > > In this case, the bug was reopened in May 2016 (by Alan, from internal > > logs). You'd have to ask him why. It was because the original "fix" for the bug slowed CC Mode's fontification down by a factor of ~3. > > http://lists.gnu.org/archive/html/emacs-bug-tracker/2016-05/msg00126.html > Oh, I was looking at > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7918;msg=32. So all those > "fake control message" things are just the original control request > getting lost somehow? > Ccing Alan, please reopen if I made a mistake by closing this. This is strange. I sent an email attempting to close the bug for a second time on 2016-05-16. This email was actually received and acknowledged by debbugs.gnu.org. But apparently the bug didn't get closed. Maybe sending mail to 7918-done@debbugs.gnu.org only works the first time around. Anyway, it's fine for the bug finally to be marked closed. Thanks. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 05 11:56:14 2017 Received: (at 7918) by debbugs.gnu.org; 5 Jul 2017 15:56:14 +0000 Received: from localhost ([127.0.0.1]:53588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSmf0-0001hT-Hz for submit@debbugs.gnu.org; Wed, 05 Jul 2017 11:56:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSmez-0001hI-Fa for 7918@debbugs.gnu.org; Wed, 05 Jul 2017 11:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSmet-0007Xd-Cy for 7918@debbugs.gnu.org; Wed, 05 Jul 2017 11:56:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSmeg-0007Hg-BY; Wed, 05 Jul 2017 11:55:54 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1dSmee-0003nF-Jh; Wed, 05 Jul 2017 11:55:52 -0400 From: Glenn Morris To: Alan Mackenzie Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> <87mv8li9s7.fsf@users.sourceforge.net> <20170703201808.GA3875@acm> X-Spook: Al Jazeera security CISU Smallpox Secure Border X-Ran: 0)(7wDF!9w7d[v85kK:-oYj8EDfMz.YD,rt2>PJtXQ@'>jQ|R"wv+ysW9c<&0/|ZyTC&mi X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 05 Jul 2017 11:55:52 -0400 In-Reply-To: <20170703201808.GA3875@acm> (Alan Mackenzie's message of "Mon, 3 Jul 2017 20:18:08 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 7918 Cc: 7918@debbugs.gnu.org, npostavs@users.sourceforge.net 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: -5.0 (-----) >> Oh, I was looking at >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7918;msg=32. So all those >> "fake control message" things are just the original control request >> getting lost somehow? Yes, I think it's basically a debbugs bug. > Maybe sending mail to 7918-done@debbugs.gnu.org only works the first > time around. Nope. There's no record of that second mail anywhere AFAICS. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 05 16:15:55 2017 Received: (at 7918) by debbugs.gnu.org; 5 Jul 2017 20:15:55 +0000 Received: from localhost ([127.0.0.1]:53772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSqiJ-0004f6-D5 for submit@debbugs.gnu.org; Wed, 05 Jul 2017 16:15:55 -0400 Received: from ocolin.muc.de ([193.149.48.4]:33484 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1dSqiH-0004ex-N4 for 7918@debbugs.gnu.org; Wed, 05 Jul 2017 16:15:54 -0400 Received: (qmail 75417 invoked by uid 3782); 5 Jul 2017 20:15:52 -0000 Received: from acm.muc.de (p548C6414.dip0.t-ipconnect.de [84.140.100.20]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 05 Jul 2017 22:15:51 +0200 Received: (qmail 2244 invoked by uid 1000); 5 Jul 2017 20:14:38 -0000 Date: Wed, 5 Jul 2017 20:14:38 +0000 To: Glenn Morris Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Message-ID: <20170705201437.GA2215@acm> References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> <87mv8li9s7.fsf@users.sourceforge.net> <20170703201808.GA3875@acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) 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: 7918 Cc: 7918@debbugs.gnu.org, npostavs@users.sourceforge.net 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: -0.0 (/) Hello, Glenn. On Wed, Jul 05, 2017 at 11:55:52 -0400, Glenn Morris wrote: > >> Oh, I was looking at > >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7918;msg=32. So all those > >> "fake control message" things are just the original control request > >> getting lost somehow? > Yes, I think it's basically a debbugs bug. > > Maybe sending mail to 7918-done@debbugs.gnu.org only works the first > > time around. > Nope. There's no record of that second mail anywhere AFAICS. Oh, but there is. In my qmail log for 2016-05-16 appears the following entry: 2016-05-16 11:38:16.645 +0000 new msg 4072519 2016-05-16 11:38:16.645 +0000 info msg 4072519: bytes 2479 from qp 19336 uid 1000 2016-05-16 11:38:16.719 +0000 starting delivery 73: msg 4072519 to remote 7918-done@debbugs.gnu.org 2016-05-16 11:38:16.719 +0000 status: local 0/10 remote 1/20 2016-05-16 11:38:17.974 +0000 delivery 73: success: 193.149.48.3_accepted_message./Remote_host_said:_250_Ok/ 2016-05-16 11:38:17.975 +0000 status: local 0/10 remote 0/20 2016-05-16 11:38:17.975 +0000 end msg 4072519 This relates to my second message to 7918-done@debbugs.gnu.org, which was clearly received by debbugs, just not acted upon. Whether it's worth following up in any way is the question. I'd be inclined just to let the matter drop, unless the same thing happens again at some stage. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 05 21:39:52 2017 Received: (at 7918) by debbugs.gnu.org; 6 Jul 2017 01:39:52 +0000 Received: from localhost ([127.0.0.1]:53960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSvln-0007Em-Nl for submit@debbugs.gnu.org; Wed, 05 Jul 2017 21:39:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSvll-0007Ea-Qg for 7918@debbugs.gnu.org; Wed, 05 Jul 2017 21:39:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSvlf-0002Fd-Pl for 7918@debbugs.gnu.org; Wed, 05 Jul 2017 21:39:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSvlL-0002DW-Rt; Wed, 05 Jul 2017 21:39:23 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1dSvlL-0005SX-Ba; Wed, 05 Jul 2017 21:39:23 -0400 From: Glenn Morris To: Alan Mackenzie Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> <87mv8li9s7.fsf@users.sourceforge.net> <20170703201808.GA3875@acm> <20170705201437.GA2215@acm> X-Spook: Federal Air Marshal Service Kidnap BATF Torreon X-Ran: l_xaG"L:>&Usf!cX&(u (Alan Mackenzie's message of "Wed, 5 Jul 2017 20:14:38 +0000") Message-ID: <64eftupcms.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 7918 Cc: 7918@debbugs.gnu.org, npostavs@users.sourceforge.net 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: -5.0 (-----) Alan Mackenzie wrote: > 2016-05-16 11:38:16.645 +0000 new msg 4072519 > 2016-05-16 11:38:16.645 +0000 info msg 4072519: bytes 2479 from > qp 19336 uid 1000 > 2016-05-16 11:38:16.719 +0000 starting delivery 73: msg 4072519 to > remote 7918-done@debbugs.gnu.org > 2016-05-16 11:38:16.719 +0000 status: local 0/10 remote 1/20 > 2016-05-16 11:38:17.974 +0000 delivery 73: success: > 193.149.48.3_accepted_message./Remote_host_said:_250_Ok/ 193.149.48.3 = mail.muc.de > 2016-05-16 11:38:17.975 +0000 status: local 0/10 remote 0/20 > 2016-05-16 11:38:17.975 +0000 end msg 4072519 > > This relates to my second message to 7918-done@debbugs.gnu.org, which was > clearly received by debbugs, just not acted upon. AFAICS there's nothing in the above that shows the mail was received by debbugs. It was received by mail.muc.de, but then who knows... There's no sign of it in any debbugs logs. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 07 10:49:10 2017 Received: (at 7918) by debbugs.gnu.org; 7 Jul 2017 14:49:10 +0000 Received: from localhost ([127.0.0.1]:56880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTUZC-00029i-0Z for submit@debbugs.gnu.org; Fri, 07 Jul 2017 10:49:10 -0400 Received: from ocolin.muc.de ([193.149.48.4]:31570 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1dTUZA-00029X-0p for 7918@debbugs.gnu.org; Fri, 07 Jul 2017 10:49:08 -0400 Received: (qmail 45796 invoked by uid 3782); 7 Jul 2017 14:49:06 -0000 Received: from acm.muc.de (p548C664D.dip0.t-ipconnect.de [84.140.102.77]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 07 Jul 2017 16:49:05 +0200 Received: (qmail 2688 invoked by uid 1000); 7 Jul 2017 14:47:51 -0000 Date: Fri, 7 Jul 2017 14:47:51 +0000 To: Glenn Morris Subject: Re: bug#7918: [PATCH] cc-mode: only the first clause of a for-loop should be checked for declarations Message-ID: <20170707144751.GA2684@acm> References: <20160425180430.GC4020@acm.fritz.box> <87lgobmwjw.fsf_-_@users.sourceforge.net> <87mv8li9s7.fsf@users.sourceforge.net> <20170703201808.GA3875@acm> <20170705201437.GA2215@acm> <64eftupcms.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64eftupcms.fsf@fencepost.gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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: 7918 Cc: 7918@debbugs.gnu.org, npostavs@users.sourceforge.net 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: -0.0 (/) Hello, Glenn. On Wed, Jul 05, 2017 at 21:39:23 -0400, Glenn Morris wrote: > Alan Mackenzie wrote: > > 2016-05-16 11:38:16.645 +0000 new msg 4072519 > > 2016-05-16 11:38:16.645 +0000 info msg 4072519: bytes 2479 from > > qp 19336 uid 1000 > > 2016-05-16 11:38:16.719 +0000 starting delivery 73: msg 4072519 to > > remote 7918-done@debbugs.gnu.org > > 2016-05-16 11:38:16.719 +0000 status: local 0/10 remote 1/20 > > 2016-05-16 11:38:17.974 +0000 delivery 73: success: > > 193.149.48.3_accepted_message./Remote_host_said:_250_Ok/ > 193.149.48.3 = mail.muc.de > > 2016-05-16 11:38:17.975 +0000 status: local 0/10 remote 0/20 > > 2016-05-16 11:38:17.975 +0000 end msg 4072519 > > > > This relates to my second message to 7918-done@debbugs.gnu.org, which was > > clearly received by debbugs, just not acted upon. > AFAICS there's nothing in the above that shows the mail was received by > debbugs. It was received by mail.muc.de, but then who knows... > There's no sign of it in any debbugs logs. Yes, you're right. Sorry about my misunderstanding. All we can say is that my email to 7918-done got lost somewhere between mail.muc.de and debbugs.gnu.org. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Aug 16 11:12:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 05 Aug 2017 11:24:04 +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