emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/csharp-mode e7e96e3 272/459: Fixed callback indentation


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode e7e96e3 272/459: Fixed callback indentation level. (#145)
Date: Sun, 22 Aug 2021 13:59:42 -0400 (EDT)

branch: externals/csharp-mode
commit e7e96e3b0cb69d98b4e12eda269719c9b23453ed
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Fixed callback indentation level. (#145)
    
    * Add test for callback.
    * Add test case with param.
---
 csharp-mode.el                  |  2 +-
 test-files/indentation-tests.cs | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/csharp-mode.el b/csharp-mode.el
index fc9cac5..4e0c088 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -2946,7 +2946,7 @@ Otherwise run `c-inside-bracelist-p'."
                                    (friend                . 0)
                                    (func-decl-cont        . +)
                                    (inclass               . +)
-                                   (inexpr-class          . +)
+                                   (inexpr-class          . 0)
                                    (inexpr-statement      . 0)
                                    (inextern-lang         . +)
                                    (inher-cont            . 
c-lineup-multi-inher)
diff --git a/test-files/indentation-tests.cs b/test-files/indentation-tests.cs
index 838548b..4c32a5a 100644
--- a/test-files/indentation-tests.cs
+++ b/test-files/indentation-tests.cs
@@ -159,6 +159,25 @@ namespace Boo
             {
                 System.Console.WriteLine("boo");
             }
+
+            /* Callback indentation test. */
+            SomeFunction(() => {
+                    // empty.
+                });
+
+            SomeFunction(() =>
+            {
+                // empty.
+            });
+
+            SomeFunction((withParam) => {
+                    // empty.
+                });
+
+            SomeFunction((withParam) =>
+            {
+                // empty.
+            });
         }
 
         public void CaseStamentIndentation()



reply via email to

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