summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-fonts.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-12-23 11:48:54 +0000
committerAlan Mackenzie <acm@muc.de>2011-12-23 11:48:54 +0000
commitcb5e207c74eb289482bdab37d9c298ec88987062 (patch)
tree13e01c719a9bae60ae25d697551d0c4a83d5b258 /lisp/progmodes/cc-fonts.el
parent60ff536cc3ed1f53a6fd2d453894beca63888a72 (diff)
downloademacs-cb5e207c74eb289482bdab37d9c298ec88987062.tar.gz
emacs-cb5e207c74eb289482bdab37d9c298ec88987062.tar.bz2
emacs-cb5e207c74eb289482bdab37d9c298ec88987062.zip
Fix unstable fontification inside templates.
Diffstat (limited to 'lisp/progmodes/cc-fonts.el')
-rw-r--r--lisp/progmodes/cc-fonts.el21
1 files changed, 2 insertions, 19 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index c6c8bd107f6..97cfe808322 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1538,25 +1538,8 @@ casts and declarations are fontified. Used on level 2 and higher."
;; prevent a repeat invocation. See elisp/lispref page "Search-based
;; Fontification".
(let* ((paren-state (c-parse-state))
- (start (point))
- (bod-lim (max (- (point) 500) (point-min)))
- decl-context bo-decl in-typedef type-type ps-elt)
-
- ;; First, are we actually in a "local" declaration?
- (setq decl-context (c-beginning-of-decl-1 bod-lim)
- bo-decl (point)
- in-typedef (looking-at c-typedef-key))
- (if in-typedef (c-forward-token-2))
- (when (and (eq (car decl-context) 'same)
- (< bo-decl start))
- ;; Are we genuinely at a type?
- (setq type-type (c-forward-type t))
- (if (and type-type
- (or (not (eq type-type 'maybe))
- (looking-at c-symbol-key)))
- (c-font-lock-declarators limit t in-typedef)))
-
- ;; Secondly, are we in any nested struct/union/class/etc. braces?
+ decl-context in-typedef ps-elt)
+ ;; Are we in any nested struct/union/class/etc. braces?
(while paren-state
(setq ps-elt (car paren-state)
paren-state (cdr paren-state))