emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 e2e937300f 1/2: Fix indentation of object_expressions in csharp


From: Theodor Thornhill
Subject: emacs-29 e2e937300f 1/2: Fix indentation of object_expressions in csharp-ts-mode
Date: Sat, 14 Jan 2023 06:36:39 -0500 (EST)

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

    Fix indentation of object_expressions in csharp-ts-mode
    
    * lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules): Make
    sure the opening brace is indented at parent-bol, and everything else
    is indented.
---
 lisp/progmodes/csharp-mode.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 79afd7f91d..81ce41618e 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -640,6 +640,11 @@ compilation and evaluation time conflicts."
      ((parent-is "namespace_declaration") parent-bol 0)
      ((parent-is "class_declaration") parent-bol 0)
      ((parent-is "constructor_declaration") parent-bol 0)
+     ((parent-is "initializer_expression") parent-bol 
csharp-ts-mode-indent-offset)
+     ((match "{" "anonymous_object_creation_expression") parent-bol 0)
+     ((parent-is "anonymous_object_creation_expression") parent-bol 
csharp-ts-mode-indent-offset)
+     ((match "{" "object_creation_expression") parent-bol 0)
+     ((parent-is "object_creation_expression") parent-bol 0)
      ((parent-is "method_declaration") parent-bol 0)
      ((parent-is "enum_declaration") parent-bol 0)
      ((parent-is "operator_declaration") parent-bol 0)



reply via email to

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