From: Theodor Thornhill Date: Wed, 25 Jan 2023 12:00:33 +0000 (+0100) Subject: Add new java indent rules X-Git-Tag: emacs-29.0.90~606 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cfe26f31893;p=emacs.git Add new java indent rules * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Check for enum_body_declarations and switch_label. --- diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index af2b0c1fa8d..8737472e514 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -81,6 +81,7 @@ ((parent-is "annotation_type_body") parent-bol java-ts-mode-indent-offset) ((parent-is "interface_body") parent-bol java-ts-mode-indent-offset) ((parent-is "constructor_body") parent-bol java-ts-mode-indent-offset) + ((parent-is "enum_body_declarations") parent-bol 0) ((parent-is "enum_body") parent-bol java-ts-mode-indent-offset) ((parent-is "switch_block") parent-bol java-ts-mode-indent-offset) ((parent-is "record_declaration_body") parent-bol java-ts-mode-indent-offset) @@ -93,6 +94,7 @@ ((parent-is "variable_declarator") parent-bol java-ts-mode-indent-offset) ((parent-is "method_invocation") parent-bol java-ts-mode-indent-offset) ((parent-is "switch_rule") parent-bol java-ts-mode-indent-offset) + ((parent-is "switch_label") parent-bol java-ts-mode-indent-offset) ((parent-is "ternary_expression") parent-bol java-ts-mode-indent-offset) ((parent-is "lambda_expression") parent-bol java-ts-mode-indent-offset) ((parent-is "element_value_array_initializer") parent-bol java-ts-mode-indent-offset)