From 80a0f9da13e5eca6195f907fbc472bde90a9a705 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arsen=20Arsenovi=C4=87?= Date: Wed, 8 Jan 2025 13:57:33 +0000 Subject: [PATCH] Add keywords var and final to Java Mode * lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): Add java entry for final. (c-no-type-kwds): Add java entry for var. (cherry picked from commit 6df0e18fed3f3012d56a72f1d5f6a44f2f039ce2) --- lisp/progmodes/cc-langs.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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' -- 2.39.5