From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 30 20:16:45 2022 Received: (at submit) by debbugs.gnu.org; 31 Jul 2022 00:16:45 +0000 Received: from localhost ([127.0.0.1]:35957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHwdQ-0000zV-Kx for submit@debbugs.gnu.org; Sat, 30 Jul 2022 20:16:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:40306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHwdO-0000zM-1H for submit@debbugs.gnu.org; Sat, 30 Jul 2022 20:16:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHwdN-0003YU-R7 for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 20:16:41 -0400 Received: from heytings.org ([95.142.160.155]:58036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHwdM-0008PE-3s for bug-gnu-emacs@gnu.org; Sat, 30 Jul 2022 20:16:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659226598; bh=Bwu3d8nGknr2Ck/r6sjoHwAZ6T1dmkOj834O8yaNa8Q=; h=Date:From:To:Subject:Message-ID:From; b=cs1B7AOv5sNpKVuhjNSxrbSbUHq8B72sMCbOAy1BCWHSKpyzUmFNBLhCO3oqDhN+X cOslSCVVRTxB+R7kSPjEeVxcRyUOK4/ENih0ZOhA/JYCasiosy0d9/11sga11zK5Ne zCpbjvM+Oh8WGuiRb2HPkvsU7FW3FPftdeBVR/AlXebTA3WgiFDl1Av0nnItCyN38/ 0HxhD8/XTyxPhcf/NfDys/aV0/BJiXmcwx5/05LKHWem4slXosq62p8KETsPeZXe28 zs2Ro75zx3xQ4ZGWBpw7dpDlc2ZcDDFxs/JGMbxdCpHfCE2nFAOdV4NEMOFZhrHcDX ubSymfapHlp2g== Date: Sun, 31 Jul 2022 00:16:37 +0000 From: Gregory Heytings To: bug-gnu-emacs@gnu.org Subject: CC Mode fontification bug Message-ID: <8c7321f2f31d5790f916@heytings.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mFyqIKSFBq" Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 (--) --mFyqIKSFBq Content-Type: text/plain; format=flowed; charset=us-ascii Recipe: emacs -Q C-x C-f src/xdisp.c RET M-g c 28 RET ;; take note of the word there: "window" M-: (get-char-property 28 'fontified) RET ;; observe that this returns t M-g g 800 RET C-v M-: (get-char-property 28 'fontified) RET ;; observe that this returns nil, because "struct window" is now visible This is a BUG. When font locking has put a fontified property and one of the font-lock-*-faces on characters in the buffer, a mode should not undo that unless it has a very good reason to do so. Otherwise scrolling again through an already fontified buffer calls fontification functions again without reason. Patch attached. With the patch, scrolling again through an already fontified buffer is ~25% faster. --mFyqIKSFBq Content-Type: text/x-diff; name=Be-conservative-with-occurrences-of-newly-found-types.patch Content-Transfer-Encoding: base64 Content-ID: <8c7321f2f35a1ff97a0a@heytings.org> Content-Disposition: attachment; filename=Be-conservative-with-occurrences-of-newly-found-types.patch RnJvbSA0ZjAxN2U3Mjg1MGExOWZhNmJmYmEzMzY2MzY1MmI4YzYzOGJiODI1 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBTdW4sIDMxIEp1 bCAyMDIyIDAwOjA0OjA3ICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEJlIGNv bnNlcnZhdGl2ZSB3aXRoIG9jY3VycmVuY2VzIG9mIG5ld2x5IGZvdW5kIHR5 cGVzLg0KDQoqIGxpc3AvcHJvZ21vZGVzL2NjLWZvbnRzLmVsIChjLWZvbnRp ZnktbmV3LWZvdW5kLXR5cGUpOiBSZW1vdmUgdGhlDQpmb250aWZpZWQgcHJv cGVydHkgb24gb2NjdXJyZW5jZXMgb2YgbmV3bHkgZm91bmQgdHlwZXMgb25s eSB3aGVuDQp0aGV5IGRvIG5vdCB5ZXQgaGF2ZSBhIGZhY2UgcHJvcGVydHku DQotLS0NCiBsaXNwL3Byb2dtb2Rlcy9jYy1mb250cy5lbCB8IDIxICsrKysr KysrKysrLS0tLS0tLS0tLQ0KIDEgZmlsZSBjaGFuZ2VkLCAxMSBpbnNlcnRp b25zKCspLCAxMCBkZWxldGlvbnMoLSkNCg0KZGlmZiAtLWdpdCBhL2xpc3Av cHJvZ21vZGVzL2NjLWZvbnRzLmVsIGIvbGlzcC9wcm9nbW9kZXMvY2MtZm9u dHMuZWwNCmluZGV4IDYyNTAxMGIwNGIuLjc1OTM2NTc0YTEgMTAwNjQ0DQot LS0gYS9saXNwL3Byb2dtb2Rlcy9jYy1mb250cy5lbA0KKysrIGIvbGlzcC9w cm9nbW9kZXMvY2MtZm9udHMuZWwNCkBAIC0yMjg0LDE2ICsyMjg0LDE3IEBA IGMtZm9udGlmeS1uZXctZm91bmQtdHlwZQ0KIAkgICh3aWRlbikNCiAJICAo Z290by1jaGFyIChwb2ludC1taW4pKQ0KIAkgICh3aGlsZSAocmUtc2VhcmNo LWZvcndhcmQgdGFyZ2V0LXJlIG5pbCB0KQ0KLQkgICAgKHB1dC10ZXh0LXBy b3BlcnR5IChtYXRjaC1iZWdpbm5pbmcgMCkgKG1hdGNoLWVuZCAwKQ0KLQkJ CSAgICAgICAnZm9udGlmaWVkIG5pbCkNCi0JICAgIChkb2xpc3QgKHdpbi1i b3VuZGFyeSB3aW5kb3ctYm91bmRhcmllcykNCi0JICAgICAgKHdoZW4gKGFu ZCAoPCAobWF0Y2gtYmVnaW5uaW5nIDApIChjZHIgd2luLWJvdW5kYXJ5KSkN Ci0JCQkgKD4gKG1hdGNoLWVuZCAwKSAoY2FyIHdpbi1ib3VuZGFyeSkpDQot CQkJIChub3QgYy1yZS1yZWRpc3BsYXktdGltZXIpKQ0KLQkJKHNldHEgYy1y ZS1yZWRpc3BsYXktdGltZXINCi0JCSAgICAgIChydW4td2l0aC10aW1lciAw IG5pbCAjJ2MtZm9yY2UtcmVkaXNwbGF5DQotCQkJCSAgICAgIChjdXJyZW50 LWJ1ZmZlcikNCi0JCQkJICAgICAgKG1hdGNoLWJlZ2lubmluZyAwKSAobWF0 Y2gtZW5kIDApKSkpKSkpKSkpKQ0KKwkgICAgKHVubGVzcyAoZ2V0LWNoYXIt cHJvcGVydHkgKG1hdGNoLWJlZ2lubmluZyAwKSAnZmFjZSkNCisJICAgICAg KHB1dC10ZXh0LXByb3BlcnR5IChtYXRjaC1iZWdpbm5pbmcgMCkgKG1hdGNo LWVuZCAwKQ0KKwkJCQkgJ2ZvbnRpZmllZCBuaWwpDQorCSAgICAgIChkb2xp c3QgKHdpbi1ib3VuZGFyeSB3aW5kb3ctYm91bmRhcmllcykNCisJCSh3aGVu IChhbmQgKDwgKG1hdGNoLWJlZ2lubmluZyAwKSAoY2RyIHdpbi1ib3VuZGFy eSkpDQorCQkJICAgKD4gKG1hdGNoLWVuZCAwKSAoY2FyIHdpbi1ib3VuZGFy eSkpDQorCQkJICAgKG5vdCBjLXJlLXJlZGlzcGxheS10aW1lcikpDQorCQkg IChzZXRxIGMtcmUtcmVkaXNwbGF5LXRpbWVyDQorCQkJKHJ1bi13aXRoLXRp bWVyIDAgbmlsICMnYy1mb3JjZS1yZWRpc3BsYXkNCisJCQkJCShjdXJyZW50 LWJ1ZmZlcikNCisJCQkJCShtYXRjaC1iZWdpbm5pbmcgMCkgKG1hdGNoLWVu ZCAwKSkpKSkpKSkpKSkpDQogDQogDA0KIDs7OyBDLg0KLS0gDQoyLjM1LjEN Cg0K --mFyqIKSFBq-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 31 01:47:53 2022 Received: (at 56848) by debbugs.gnu.org; 31 Jul 2022 05:47:54 +0000 Received: from localhost ([127.0.0.1]:36269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oI1nt-0001rA-AU for submit@debbugs.gnu.org; Sun, 31 Jul 2022 01:47:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oI1np-0001q8-93 for 56848@debbugs.gnu.org; Sun, 31 Jul 2022 01:47:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50014) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI1nj-000334-QV; Sun, 31 Jul 2022 01:47:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UMK+nyss46lajM7XfrLT2Ub+UV/HJHCDXcK88+Jz824=; b=X54L5jn+8LdH tKciE2MYoC6HLRnmgalxCsSN+51Nclifc/pu8Mo75/+LIl/ZM9q03UPojRI7R3fWjqlekqOvE2uCo J/MP7gfWtYjsGYk5QM36WHUb42PoBM4I3DwSN+6fCm/fBzys9aBGt7r0OS/57KP0bMriuIiqrPOWb c/vt190zngTBJdOkiaic00MUeHumympheFcAFwB5L2NcrE19b4zHNzWC1EIh67YSwzRlNyZrEbzAP mN0k20WXDK66d1wD180ImJCIFgq6rKBxIA4QJinnkGluQZxnFiCodUf59aUet4m55H6dAuqoO3O6y 59DynwU3yHVC/Pl4L+Mvcw==; Received: from [87.69.77.57] (port=1632 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI1nj-0001Qb-Ac; Sun, 31 Jul 2022 01:47:43 -0400 Date: Sun, 31 Jul 2022 08:47:29 +0300 Message-Id: <83v8rd4yvi.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <8c7321f2f31d5790f916@heytings.org> (message from Gregory Heytings on Sun, 31 Jul 2022 00:16:37 +0000) Subject: Re: bug#56848: CC Mode fontification bug References: <8c7321f2f31d5790f916@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56848 Cc: 56848@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: -3.3 (---) > Date: Sun, 31 Jul 2022 00:16:37 +0000 > From: Gregory Heytings > > emacs -Q > C-x C-f src/xdisp.c RET > M-g c 28 RET > ;; take note of the word there: "window" > M-: (get-char-property 28 'fontified) RET > ;; observe that this returns t > M-g g 800 RET > C-v > M-: (get-char-property 28 'fontified) RET > ;; observe that this returns nil, because "struct window" is now visible As an aside, one should be very careful with trusting the likes of M-: (get-char-property 28 'fontified) RET because entering the minibuffer triggers a rather thorough redisplay cycle, which could change the 'fontified' property one is trying to obtain. Instead, it is advisable to write a simple command that would do the evaluation, then bind it to a single key, like F5, and invoke through that key. Even better, invoke the function from the debugger. (I'm not saying that the nil above is inaccurate, since the problematic position is outside the window, I'm just saying one should be very careful with this stuff.) FWIW, I can reproduce this on master, but not on the release branch. I thought this was related to bug#56841, but since that one happens on emacs-28 as well, it probably is a separate issue. > When font locking has put a fontified property and one of the > font-lock-*-faces on characters in the buffer, a mode should not undo that > unless it has a very good reason to do so. Otherwise scrolling again > through an already fontified buffer calls fontification functions again > without reason. The fact that the word 'window' is involved in both cases seems to ring a bell: isn't there a feature in CC Mode's fontifications whereby it does something with identifiers whose type it knows about, by going forward and back into the buffer and "fixing" their fontifications? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 31 04:08:50 2022 Received: (at 56848) by debbugs.gnu.org; 31 Jul 2022 08:08:50 +0000 Received: from localhost ([127.0.0.1]:36331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oI40H-0005m5-UR for submit@debbugs.gnu.org; Sun, 31 Jul 2022 04:08:50 -0400 Received: from heytings.org ([95.142.160.155]:60202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oI40F-0005lw-QA for 56848@debbugs.gnu.org; Sun, 31 Jul 2022 04:08:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659254925; bh=0ky+hMLZJhWIG3tFmEzKX4LlIIEoMJ/edIbyjFgvADw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=TRgmVaWjfWNI4HdsF6Ynu4BpGa7fhH74GnGymv1t9WwZjdFOBPEXKHHU2MKWor2Cs EDVoRJNBgpkPF03OICcGnh2ICSQBRzuRLtODaxzWWYPJ10l+IXFeHgz03HWj+GHoDt DpAbh5lX+XZFuigoummDyj9X7qe2Q7KbIDytB2X5rBLm28w4Esfzs9oGmcWvCGPRmX B7YRwJ2SvxCJLpSy+CBIgwE5WzHNb8Ro17n5myNnhZxJ2Lb+JyIz8vD0iIeqtzhrdK 7FF0D+3vBO6sB88og9W6mnj5crKAk53iZsvuZqucNrswwhG7BC3D5ROK6IFoNY2dfD /EInbStAhaBbQ== Date: Sun, 31 Jul 2022 08:08:45 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#56848: CC Mode fontification bug In-Reply-To: <83v8rd4yvi.fsf@gnu.org> Message-ID: <8c7321f2f3e4c925e697@heytings.org> References: <8c7321f2f31d5790f916@heytings.org> <83v8rd4yvi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56848 Cc: 56848@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 (-) > > As an aside, one should be very careful with trusting the likes of > > M-: (get-char-property 28 'fontified) RET > > because entering the minibuffer triggers a rather thorough redisplay > cycle, which could change the 'fontified' property one is trying to > obtain. Instead, it is advisable to write a simple command that would > do the evaluation, then bind it to a single key, like F5, and invoke > through that key. Even better, invoke the function from the debugger. > > (I'm not saying that the nil above is inaccurate, since the problematic > position is outside the window, I'm just saying one should be very > careful with this stuff.) > Indeed, I tried to make the recipe as simple as possible, but during my tests I did use such a function. > > The fact that the word 'window' is involved in both cases seems to ring > a bell: isn't there a feature in CC Mode's fontifications whereby it > does something with identifiers whose type it knows about, by going > forward and back into the buffer and "fixing" their fontifications? > Yes, that's what the 'c-fontify-new-found-type' modified by the patch does. Currently, when a new type has been found, all occurrences of its identifier are "unfontified" with: (widen) (goto-char (point-min)) (while (re-search-forward ...) (put-text-property ... 'fontified nil)) When font locking has already put, say, a font-lock-comment-face, or a font-lock-function-name-face, or a font-lock-variable-name-face on an occurrence of that identifier, there is no reason to undo that. It is only occurrences that have been marked as "fontified" but on which no face has been put that should be unfontified. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 16:28:26 2023 Received: (at 56848-done) by debbugs.gnu.org; 14 Jan 2023 21:28:26 +0000 Received: from localhost ([127.0.0.1]:55652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGo4g-0001lK-5O for submit@debbugs.gnu.org; Sat, 14 Jan 2023 16:28:26 -0500 Received: from heytings.org ([95.142.160.155]:44614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGo4f-0001l9-E0 for 56848-done@debbugs.gnu.org; Sat, 14 Jan 2023 16:28:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673731704; bh=scIZXbopryPzk4J8KRLv7sGzvEhEmf/Uzs570xLil/s=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=WSL+pDbG3Ib6h3jVFyM6KqOsGchEaBM4IQH6bTAlCmIxXdt3bv9MbFp8ZBIU8hLN6 dCInd/CoZP/VDaA9MAhtkSwL+8IKQ5BobBr4nxK9TYElwB0SmK3QG2/0eDHkDP4Eyx PZ+jVu2hPOjiy32z9feZjwczqiHupl3EyWUL5FtInd76CH6xOZndfe/qMeF7zxsJEC Ks/Ch6pMJonxNccRFhb1zMeOMrRGpcfpqWJncdzLMonFgTF84zQFN088MTjloClSHA AyPD66woCh9Wt1uESyv+RyHO2Nj87QRFMT2U40DXBZ/G1iPk2arKsUV8SWj6Z8fH7s RnaoJRtnu3KtQ== Date: Sat, 14 Jan 2023 21:28:24 +0000 From: Gregory Heytings To: 56848-done@debbugs.gnu.org Subject: Re: bug#56848: CC Mode fontification bug In-Reply-To: <8c7321f2f31d5790f916@heytings.org> Message-ID: <8aadf0ddd557c31535cf@heytings.org> References: <8c7321f2f31d5790f916@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56848-done Cc: 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: -1.0 (-) Closing this bug. The proposed patch has been included in commits 4bd8ad2bc5 and 1cbc22b9c7. From unknown Tue Jun 17 21:50:09 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: Sun, 15 Jan 2023 12:33: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 Sun Jan 15 07:32:45 2023 Received: (at 56848-done) by debbugs.gnu.org; 15 Jan 2023 12:32:45 +0000 Received: from localhost ([127.0.0.1]:56352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH2Bo-0004tb-VJ for submit@debbugs.gnu.org; Sun, 15 Jan 2023 07:32:45 -0500 Received: from mx3.muc.de ([193.149.48.5]:31573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH2Bj-0004t5-JO for 56848-done@debbugs.gnu.org; Sun, 15 Jan 2023 07:32:41 -0500 Received: (qmail 97552 invoked by uid 3782); 15 Jan 2023 13:32:32 +0100 Received: from acm.muc.de (p4fe15f20.dip0.t-ipconnect.de [79.225.95.32]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 15 Jan 2023 13:32:32 +0100 Received: (qmail 6357 invoked by uid 1000); 15 Jan 2023 12:32:31 -0000 Date: Sun, 15 Jan 2023 12:32:31 +0000 To: Gregory Heytings Subject: Re: bug#56848: CC Mode fontification bug Message-ID: References: <8c7321f2f31d5790f916@heytings.org> <8aadf0ddd557c31535cf@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8aadf0ddd557c31535cf@heytings.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 56848-done Cc: 56848-done@debbugs.gnu.org, control@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 (-) reopen 56848 quit Hello, Gregory. Thanks for the Cc:! I'm (trying to) reopen the bug with this post. On Sat, Jan 14, 2023 at 21:28:24 +0000, Gregory Heytings wrote: > Closing this bug. The proposed patch has been included in commits > 4bd8ad2bc5 and 1cbc22b9c7. I wasn't previously aware of this bug. I'm not at all happy about the patches you proposed and have applied. In particular, you say (2022-07-31): > When font locking has already put, say, a font-lock-comment-face, or a > font-lock-function-name-face, or a font-lock-variable-name-face on an > occurrence of that identifier, there is no reason to undo that. It is > only occurrences that have been marked as "fontified" but on which no > face has been put that should be unfontified. , without justification. There are circumstances in which identifiers with font-lock-type-face need to be refontified with font-lock-variable-face, and the reverse, amongs others. It was trying to optimise in this area which caused some of Po Lu's bug reports over the last three months. An example of what can go wrong is, supposing we have just mistyped food sausage; as foo sausage; .. "All" the identifiers "foo" throughout the buffer will get fontified with type-face. On returning to the line and correcting "foo" to "food", these "foo"s need to be refontified. This actual scenario occurred in one of Po's bug reports. I think that after the patches in this bug, the refontification won't happen. I've reopened the bug, and I'm asking you to reconsider these things. Thanks! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 15 07:53:04 2023 Received: (at 56848) by debbugs.gnu.org; 15 Jan 2023 12:53:04 +0000 Received: from localhost ([127.0.0.1]:56374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH2VU-0007ih-LX for submit@debbugs.gnu.org; Sun, 15 Jan 2023 07:53:04 -0500 Received: from heytings.org ([95.142.160.155]:45468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH2VR-0007iH-Ds for 56848@debbugs.gnu.org; Sun, 15 Jan 2023 07:53:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673787180; bh=d32zaUnlEhvcG6C8N60eCkFe5GC9VqZSlB6tC2sM3PU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=UbCjBl3PJQL2CDzesvIOhcDQZri+UPH0bpXwzpd7XZaRN8dM34BXyDKLBdd0y6JfF AZMwqewLDhkXpyP/CQdgDK7+XXPjkqmJ1OgVfIRVOpX9NHP9xp66XCb+liUq8j66Su 3zscifLG0hODsckmc9vPq54rqXO0GgCMQLGPZgJZ5LaYvYnRTJd8icf3V6AiJXb30M fM/wlvP7grqWhP9YM4cETdLrwlK0MIpkJQLJFWQGx/SN//k6LtsAqGRdUyfJjemlcm 0M7TIcedeDlTSGO87fWgmoRzd50Ynb0XmpivkvZzjtzI42ZemM8ubbnDi2y4fGhCsm TROi4OynTfmJA== Date: Sun, 15 Jan 2023 12:52:59 +0000 From: Gregory Heytings To: Alan Mackenzie Subject: Re: bug#56848: CC Mode fontification bug In-Reply-To: Message-ID: References: <8c7321f2f31d5790f916@heytings.org> <8aadf0ddd557c31535cf@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 56848 Cc: 56848@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 (-) Hi Alan, >> Closing this bug. The proposed patch has been included in commits >> 4bd8ad2bc5 and 1cbc22b9c7. > > I wasn't previously aware of this bug. I'm not at all happy about the > patches you proposed and have applied. > My post was apparently not clear enough, sorry for that: I did not apply anything, I closed this bug and recorded in the bug tracker that it was fixed by two of your commits. The current state of the function that the patch modified is essentially what was proposed in the patch. From unknown Tue Jun 17 21:50:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 13 Feb 2023 12: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