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

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

[nongnu] elpa/swift-mode b97b570 260/496: Fix indent rule for '(' and pa


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode b97b570 260/496: Fix indent rule for '(' and pass all test
Date: Sun, 29 Aug 2021 11:33:47 -0400 (EDT)

branch: elpa/swift-mode
commit b97b570bd93499bfd63a7f08b01c82b09851944b
Author: uk-ar <yuuki.ari@gmail.com>
Commit: uk-ar <yuuki.ari@gmail.com>

    Fix indent rule for '(' and pass all test
---
 swift-mode.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index 21a6829..30e8b63 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -443,8 +443,12 @@
        (smie-rule-parent 0)))
 
     (`(:after . "(")
-     (if (smie-rule-parent-p "(") 0
-       (smie-rule-parent swift-indent-offset)))
+     (cond
+      ((smie-rule-parent-p "(") 0)
+      ((and (smie-rule-parent-p "." "func")
+            (not (smie-rule-hanging-p))) 1)
+      (t (smie-rule-parent swift-indent-offset))))
+
     (`(:before . "(")
      (cond
       ((smie-rule-next-p "[") (smie-rule-parent))



reply via email to

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