GNU bug report logs - #56848
CC Mode fontification bug

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Sun, 31 Jul 2022 00:17:01 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Gregory Heytings <gregory <at> heytings.org>
Subject: bug#56848: closed (Re: bug#56848: CC Mode fontification bug)
Date: Sat, 14 Jan 2023 21:29:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#56848: CC Mode fontification bug

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 56848 <at> debbugs.gnu.org.

-- 
56848: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56848
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Gregory Heytings <gregory <at> heytings.org>
To: 56848-done <at> debbugs.gnu.org
Cc: Alan Mackenzie <acm <at> muc.de>
Subject: Re: bug#56848: CC Mode fontification bug
Date: Sat, 14 Jan 2023 21:28:24 +0000
Closing this bug.  The proposed patch has been included in commits 
4bd8ad2bc5 and 1cbc22b9c7.


[Message part 3 (message/rfc822, inline)]
From: Gregory Heytings <gregory <at> heytings.org>
To: bug-gnu-emacs <at> gnu.org
Subject: CC Mode fontification bug
Date: Sun, 31 Jul 2022 00:16:37 +0000
[Message part 4 (text/plain, inline)]
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.
[Be-conservative-with-occurrences-of-newly-found-types.patch (text/x-diff, attachment)]

This bug report was last modified 2 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.