branch: externals/csharp-mode
commit e7e96e3b0cb69d98b4e12eda269719c9b23453ed
Author: Jen-Chieh Shen <jcs090...@gmail.com>
Commit: Jostein Kjønigsen <jost...@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