]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix identation in csharp-mode.el
authorJostein Kjønigsen <jostein@kjonigsen.net>
Fri, 21 Feb 2025 14:09:26 +0000 (15:09 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:09:26 +0000 (09:09 +0100)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules): Fix
indentation for using statements and multiline lambdas.  (Bug#75883)
Patch based on bug report by Dino Chiesa <dpchiesa@hotmail.com>.

(cherry picked from commit ecddc8227d9be8283d9bb47639a61c888a036896)

lisp/progmodes/csharp-mode.el

index b26ce4e34a5c27141dca7523ee984bf252ab7955..6f3fd08089f4dc691aad96de3635c86f40f367cf 100644 (file)
@@ -711,7 +711,9 @@ compilation and evaluation time conflicts."
      ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
      ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
      ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
-     ((parent-is "parenthesized_expression") parent-bol csharp-ts-mode-indent-offset))))
+     ((parent-is "parenthesized_expression") parent-bol csharp-ts-mode-indent-offset)
+     ((parent-is "using_statement") parent-bol 0)
+     ((parent-is "lambda_expression") parent-bol 0))))
 
 (defvar csharp-ts-mode--keywords
   '("using" "namespace" "class" "if" "else" "throw" "new" "for"