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

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

[nongnu] elpa/swift-mode d42c53c 147/496: Use semantic smie function ins


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode d42c53c 147/496: Use semantic smie function instead of regex for multi-line dot
Date: Sun, 29 Aug 2021 11:33:25 -0400 (EDT)

branch: elpa/swift-mode
commit d42c53c43f446fe012d7c448e7b3d927a9b7c855
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>

    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 f16fbe9..78d6ce1 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -274,10 +274,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]