aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-fonts.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index e8552af8ed8..b35d33a5fd3 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1231,13 +1231,16 @@ casts and declarations are fontified. Used on level 2 and higher."
1231 ;; Got a cached hit in some other type of arglist. 1231 ;; Got a cached hit in some other type of arglist.
1232 (type 1232 (type
1233 (cons 'arglist t)) 1233 (cons 'arglist t))
1234 (not-front-decl 1234 ((and not-front-decl
1235 ;; The point is within the range of a previously 1235 ;; The point is within the range of a previously
1236 ;; encountered type decl expression, so the arglist 1236 ;; encountered type decl expression, so the arglist
1237 ;; is probably one that contains declarations. 1237 ;; is probably one that contains declarations.
1238 ;; However, if `c-recognize-paren-inits' is set it 1238 ;; However, if `c-recognize-paren-inits' is set it
1239 ;; might also be an initializer arglist. 1239 ;; might also be an initializer arglist.
1240 ;; 1240 (or (not c-recognize-paren-inits)
1241 (save-excursion
1242 (goto-char match-pos)
1243 (not (c-back-over-member-initializers)))))
1241 ;; The result of this check is cached with a char 1244 ;; The result of this check is cached with a char
1242 ;; property on the match token, so that we can look 1245 ;; property on the match token, so that we can look
1243 ;; it up again when refontifying single lines in a 1246 ;; it up again when refontifying single lines in a
@@ -1248,17 +1251,21 @@ casts and declarations are fontified. Used on level 2 and higher."
1248 ;; Got an open paren preceded by an arith operator. 1251 ;; Got an open paren preceded by an arith operator.
1249 ((and (eq (char-before match-pos) ?\() 1252 ((and (eq (char-before match-pos) ?\()
1250 (save-excursion 1253 (save-excursion
1254 (goto-char match-pos)
1251 (and (zerop (c-backward-token-2 2)) 1255 (and (zerop (c-backward-token-2 2))
1252 (looking-at c-arithmetic-op-regexp)))) 1256 (looking-at c-arithmetic-op-regexp))))
1253 (cons nil nil)) 1257 (cons nil nil))
1254 ;; In a C++ member initialization list. 1258 ;; In a C++ member initialization list.
1255 ((and (eq (char-before match-pos) ?,) 1259 ((and (eq (char-before match-pos) ?,)
1256 (c-major-mode-is 'c++-mode) 1260 (c-major-mode-is 'c++-mode)
1257 (save-excursion (c-back-over-member-initializers))) 1261 (save-excursion
1262 (goto-char match-pos)
1263 (c-back-over-member-initializers)))
1258 (c-put-char-property (1- match-pos) 'c-type 'c-not-decl) 1264 (c-put-char-property (1- match-pos) 'c-type 'c-not-decl)
1259 (cons 'not-decl nil)) 1265 (cons 'not-decl nil))
1260 ;; At start of a declaration inside a declaration paren. 1266 ;; At start of a declaration inside a declaration paren.
1261 ((save-excursion 1267 ((save-excursion
1268 (goto-char match-pos)
1262 (and (memq (char-before match-pos) '(?\( ?\,)) 1269 (and (memq (char-before match-pos) '(?\( ?\,))
1263 (c-go-up-list-backward match-pos) 1270 (c-go-up-list-backward match-pos)
1264 (eq (char-after) ?\() 1271 (eq (char-after) ?\()