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

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

[nongnu] elpa/swift-mode 1753f23 149/496: Merge pull request #53 from ap


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 1753f23 149/496: Merge pull request #53 from ap4y/improve_smie_dot_exp_rule
Date: Sun, 29 Aug 2021 11:33:26 -0400 (EDT)

branch: elpa/swift-mode
commit 1753f23b36a0a2f9b1ec4647cae8157300a834c4
Merge: 4286ff9 d42c53c
Author: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Merge pull request #53 from ap4y/improve_smie_dot_exp_rule
    
    Use semantic smie function instead of regex for multi-line dot expression 
indentation
---
 swift-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index 4cce2e1..452ca75 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -275,10 +275,10 @@
 
     ;; Apply swift-indent-multiline-statement-offset only if
     ;; - dot is followed by newline, or
-    ;; - have at least one whitespace character before dot
+    ;; - if dot is a first token on the line
     (`(:before . ".")
      (if (or (looking-at "[.][\n]")
-             (looking-back "[ \t\n]" 1 t))
+             (smie-rule-bolp))
          (smie-rule-parent swift-indent-multiline-statement-offset)))
 
     ;; Apply swift-indent-multiline-statement-offset if



reply via email to

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