]> git.eshelyaron.com Git - emacs.git/commitdiff
Add keywords var and final to Java Mode
authorArsen Arsenović <arsen@aarsen.me>
Wed, 8 Jan 2025 13:57:33 +0000 (13:57 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sat, 11 Jan 2025 11:16:59 +0000 (12:16 +0100)
* 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

index 51730bae4102faaf7d0cc836cf293364c46b0b89..8fee8af2fcf70f7d1f19ee441290a0e74956c96c 100644 (file)
@@ -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'