aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2016-05-10 14:36:02 +0000
committerAlan Mackenzie2016-05-10 14:36:02 +0000
commit8939ae68d430ef272194ac64144ceb58ae0dbd3f (patch)
tree406aaccafecf1617ec4c66246d6196c439597399
parentcfa59d6a26b55d81d5df3d5a0ba618c8c5808aa0 (diff)
downloademacs-8939ae68d430ef272194ac64144ceb58ae0dbd3f.tar.gz
emacs-8939ae68d430ef272194ac64144ceb58ae0dbd3f.zip
Revert "Fix spurious fontification of "for (; a * b;)" in CC Mode."
This reverts commit 89d1776b81ab552192ee41f13ce84ff86bda4556. It is being reverted because it slowed down CC Mode's fontification too much (factor ~3). It was the fix to bug #7918.
-rw-r--r--lisp/progmodes/cc-fonts.el16
1 files changed, 2 insertions, 14 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 6c348514915..e171b20f328 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1205,20 +1205,8 @@ casts and declarations are fontified. Used on level 2 and higher."
1205 'font-lock-keyword-face) 1205 'font-lock-keyword-face)
1206 (looking-at c-not-decl-init-keywords)) 1206 (looking-at c-not-decl-init-keywords))
1207 (and c-macro-with-semi-re 1207 (and c-macro-with-semi-re
1208 (looking-at c-macro-with-semi-re)) ; 2008-11-04 1208 (looking-at c-macro-with-semi-re))) ; 2008-11-04
1209 (save-excursion ; A construct after a ; in a `for' statement 1209 ;; Don't do anything more if we're looking at a keyword that
1210 ; can't be a declaration.
1211 (and (c-go-up-list-backward)
1212 (eq (char-after) ?\()
1213 (progn (c-backward-syntactic-ws)
1214 (c-simple-skip-symbol-backward))
1215 (looking-at c-paren-stmt-key)
1216 (progn (goto-char match-pos)
1217 (while (and (eq (char-before) ?\))
1218 (c-go-list-backward))
1219 (c-backward-syntactic-ws))
1220 (eq (char-before) ?\;)))))
1221 ;; Don't do anything more if we're looking at something that
1222 ;; can't start a declaration. 1210 ;; can't start a declaration.
1223 t 1211 t
1224 1212