[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 1cbc22b9c7: CC Mode: partially revert commit from 2022-10-04
From: |
Alan Mackenzie |
Subject: |
emacs-29 1cbc22b9c7: CC Mode: partially revert commit from 2022-10-04 |
Date: |
Tue, 10 Jan 2023 15:32:08 -0500 (EST) |
branch: emacs-29
commit 1cbc22b9c7f836f5b3311213dca8afa853513442
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
CC Mode: partially revert commit from 2022-10-04
This reversion is of an ill-advised optimization, which resulted in non-type
identifiers getting fontified as types.
* lisp/progmodes/cc-fonts.el (c-fontify-new-found-type): Rather than writing
the expected face directly to the text, instead remove the `fontified'
property. This allows the full font-lock mechanism to fontify the buffer
correctly.
---
lisp/progmodes/cc-fonts.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index d84c4f8ad8..4dcc3e0ade 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -2530,8 +2530,8 @@ higher."
(get-text-property (match-beginning 0) 'fontified)
(not (memq (c-get-char-property (match-beginning 0) 'face)
c-literal-faces)))
- (c-put-font-lock-face (match-beginning 0) (match-end 0)
- font-lock-type-face))
+ (put-text-property (match-beginning 0) (match-end 0)
+ 'fontified nil))
(dolist (win-boundary window-boundaries)
(when (and (< (match-beginning 0) (cdr win-boundary))
(> (match-end 0) (car win-boundary))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 1cbc22b9c7: CC Mode: partially revert commit from 2022-10-04,
Alan Mackenzie <=