branch: elpa/swift-mode commit fd9ed2073c610ed8ad542a516d111d3c0b3801ec Author: uk-ar <yuuki....@gmail.com> Commit: uk-ar <yuuki....@gmail.com>
Modify indents around comma to meet Xcode spec --- swift-mode.el | 4 ++-- test/indentation-tests.el | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index 9597644..15a7e20 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -370,8 +370,8 @@ ;; Indent second line of the multi-line class ;; definitions with swift-indent-offset (`(:before . ",") - (if (smie-rule-parent-p "class") - (smie-rule-parent swift-indent-offset))) + (if (smie-rule-parent-p "class" "case") + (smie-rule-parent))) ;; Disable unnecessary default indentation for ;; "func" and "class" keywords diff --git a/test/indentation-tests.el b/test/indentation-tests.el index 256f3d7..9773aac 100644 --- a/test/indentation-tests.el +++ b/test/indentation-tests.el @@ -486,7 +486,7 @@ case foo where bar, " " switch true { case foo where bar, - |bar where baz: +|bar where baz: } ") @@ -685,7 +685,7 @@ class Foo: Foo, Bar, } " " class Foo: Foo, Bar, - |Baz { +|Baz { } ") @@ -725,7 +725,7 @@ public class Foo: Foo, Bar, } " " public class Foo: Foo, Bar, - |Baz { +|Baz { } ")