From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#56848: CC Mode fontification bug Date: Sun, 15 Jan 2023 12:32:31 +0000 Message-ID: References: <8c7321f2f31d5790f916@heytings.org> <8aadf0ddd557c31535cf@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34746"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56848-done@debbugs.gnu.org, control@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 15 13:33:27 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pH2CV-0008vS-8g for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Jan 2023 13:33:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH2CE-0001De-EH; Sun, 15 Jan 2023 07:33:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pH2C6-0000w2-U0 for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 07:33:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pH2C6-0005Yd-Jm for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 07:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pH2C6-0004uL-Fj for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 07:33:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jan 2023 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 56848 X-GNU-PR-Package: emacs Mail-Followup-To: 56848@debbugs.gnu.org, acm@muc.de, gregory@heytings.org Original-Received: via spool by 56848-done@debbugs.gnu.org id=D56848.167378596518828 (code D ref 56848); Sun, 15 Jan 2023 12:33:02 +0000 Original-Received: (at 56848-done) by debbugs.gnu.org; 15 Jan 2023 12:32:45 +0000 Original-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 Original-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 Original-Received: (qmail 97552 invoked by uid 3782); 15 Jan 2023 13:32:32 +0100 Original-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 Original-Received: (qmail 6357 invoked by uid 1000); 15 Jan 2023 12:32:31 -0000 Content-Disposition: inline In-Reply-To: <8aadf0ddd557c31535cf@heytings.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253425 Archived-At: 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).