diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 51730bae410..8fee8af2fcf 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -2384,6 +2384,7 @@ fontified with the keyword face and not the type face." c '("const" "restrict" "volatile") c++ '("const" "noexcept" "volatile") objc '("const" "volatile") + java '("final") t (append (c-lang-const c-no-type-kwds) (c-lang-const c-type-modifier-prefix-kwds))) @@ -2635,7 +2636,8 @@ will be handled." (c-lang-defconst c-no-type-kwds "Keywords which remove the need to specify a type in declarations" t nil - c++ '("auto")) + c++ '("auto") + java '("var")) (c-lang-defconst c-no-type-key ;; Regexp matching an entry from `c-no-type-kwds'