Commit 201f950e authored by Alan Mackenzie's avatar Alan Mackenzie

Correct the fontification of C++ Mode enclosed declarations.

* lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): abolish the
spurious check that the character before the start of an enclosed declaration
must be ; or }.  It might also be {.
parent 7bb75e3d
......@@ -1710,18 +1710,16 @@ casts and declarations are fontified. Used on level 2 and higher."
(eq (char-after ps-elt) ?\{))
(goto-char ps-elt)
(c-syntactic-skip-backward "^;{}" decl-search-lim)
(when (or (bobp)
(memq (char-before) '(?\; ?})))
(c-forward-syntactic-ws)
(setq in-typedef (looking-at c-typedef-key))
(if in-typedef (c-forward-token-2))
(when (and c-opt-block-decls-with-vars-key
(looking-at c-opt-block-decls-with-vars-key))
(goto-char ps-elt)
(when (c-safe (c-forward-sexp))
(c-forward-syntactic-ws)
(c-font-lock-declarators limit t in-typedef
(not (c-bs-at-toplevel-p (point)))))))))))
(c-forward-syntactic-ws)
(setq in-typedef (looking-at c-typedef-key))
(if in-typedef (c-forward-token-2))
(when (and c-opt-block-decls-with-vars-key
(looking-at c-opt-block-decls-with-vars-key))
(goto-char ps-elt)
(when (c-safe (c-forward-sexp))
(c-forward-syntactic-ws)
(c-font-lock-declarators limit t in-typedef
(not (c-bs-at-toplevel-p (point))))))))))
(defun c-font-lock-raw-strings (limit)
;; Fontify C++ raw strings.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment