1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00

Java Mode: Fontify identifiers in the presence of annotations.

* lisp/progmodes/cc-engine.el (c-forward-annotation): Tidy up the coding:
Don't move point when the defun fails.
(c-forward-decl-or-cast-1): Correct a usage of match data.

* lisp/progmodes/cc-fonts.el (c-font-lock-maybe-decl-faces): Remove.
(c-font-lock-declarations): Use the new c-maybe-decl-faces in place of the
removed variable.

* lisp/progmodes/cc-langs.el (c-maybe-decl-faces): New language variable.
This commit is contained in:
Alan Mackenzie 2016-01-11 17:46:04 +00:00
parent 36b953947e
commit b51f1ef82f
3 changed files with 32 additions and 23 deletions

View file

@ -3251,6 +3251,19 @@ way."
objc t)
(c-lang-defvar c-type-decl-end-used (c-lang-const c-type-decl-end-used))
(c-lang-defconst c-maybe-decl-faces
"List of faces that might be put at the start of a type when
`c-font-lock-declarations' runs. This must be evaluated (with `eval') at
runtime to get the actual list of faces. This ensures that face name
aliases in Emacs are resolved."
t '(list nil
font-lock-type-face
c-reference-face-name
font-lock-keyword-face)
java (append (c-lang-const c-maybe-decl-faces)
'(font-lock-preprocessor-face)))
(c-lang-defvar c-maybe-decl-faces (c-lang-const c-maybe-decl-faces))
;;; Wrap up the `c-lang-defvar' system.