emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 cfe26f3189 1/2: Add new java indent rules


From: Theodor Thornhill
Subject: emacs-29 cfe26f3189 1/2: Add new java indent rules
Date: Wed, 25 Jan 2023 07:05:06 -0500 (EST)

branch: emacs-29
commit cfe26f31893681fcba36a635546d62ab512524ab
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>

    Add new java indent rules
    
    * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Check
    for enum_body_declarations and switch_label.
---
 lisp/progmodes/java-ts-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index af2b0c1fa8..8737472e51 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]