aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-engine.el8
-rw-r--r--lisp/progmodes/cc-fonts.el2
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index e7a8962ac2b..4af7c359747 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -5681,7 +5681,7 @@ comment at the start of cc-engine.el for more info."
5681 ;; Whether the last position returned from `c-find-decl-prefix-search' 5681 ;; Whether the last position returned from `c-find-decl-prefix-search'
5682 ;; is at the top-level (including directly in a class or namespace, 5682 ;; is at the top-level (including directly in a class or namespace,
5683 ;; etc.). 5683 ;; etc.).
5684 cfd-top-level) 5684 (cfd-top-level (c-bs-at-toplevel-p (point))))
5685 5685
5686 ;; Initialize by finding a syntactically relevant start position 5686 ;; Initialize by finding a syntactically relevant start position
5687 ;; before the point, and do the first `c-decl-prefix-or-start-re' 5687 ;; before the point, and do the first `c-decl-prefix-or-start-re'
@@ -8379,7 +8379,11 @@ comment at the start of cc-engine.el for more info."
8379 (c-simple-skip-symbol-backward)) 8379 (c-simple-skip-symbol-backward))
8380 (>= (point) type-start) 8380 (>= (point) type-start)
8381 (equal (buffer-substring-no-properties (point) end-1) 8381 (equal (buffer-substring-no-properties (point) end-1)
8382 name)) 8382 name)
8383 (goto-char end-2)
8384 (progn
8385 (c-forward-syntactic-ws)
8386 (eq (char-after) ?\()))
8383 ;; It is a (con|de)structor name. In that case the 8387 ;; It is a (con|de)structor name. In that case the
8384 ;; declaration is typeless so zap out any preceding 8388 ;; declaration is typeless so zap out any preceding
8385 ;; identifier(s) that we might have taken as types. 8389 ;; identifier(s) that we might have taken as types.
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 923f077b411..adb1f1a4937 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -900,7 +900,7 @@ casts and declarations are fontified. Used on level 2 and higher."
900 (when (memq prop '(c-decl-id-start c-decl-type-start)) 900 (when (memq prop '(c-decl-id-start c-decl-type-start))
901 (c-forward-syntactic-ws limit) 901 (c-forward-syntactic-ws limit)
902 (c-font-lock-declarators limit t (eq prop 'c-decl-type-start) 902 (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)
903 (c-bs-at-toplevel-p (point))))) 903 (not (c-bs-at-toplevel-p (point))))))
904 904
905 (setq c-font-lock-context ;; (c-guess-font-lock-context) 905 (setq c-font-lock-context ;; (c-guess-font-lock-context)
906 (save-excursion 906 (save-excursion