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

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

[nongnu] elpa/swift-mode c09229a 198/496: Use semantic hanging-p functio


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode c09229a 198/496: Use semantic hanging-p function instead of custom regex when checking
Date: Sun, 29 Aug 2021 11:33:35 -0400 (EDT)

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

    Use semantic hanging-p function instead of custom regex when checking
    for the last token on the line
---
 swift-mode.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index c2f2150..4640a56 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -321,15 +321,14 @@
     ;; - dot is followed by newline, or
     ;; - if dot is a first token on the line
     (`(:before . ".")
-     (if (or (looking-at "[.][\n]")
+     (if (or (smie-rule-hanging-p)
              (smie-rule-bolp))
          swift-indent-multiline-statement-offset))
 
     ;; Apply swift-indent-multiline-statement-offset if
     ;; operator is the last symbol on the line
     (`(:before . "OP")
-     (if (and (looking-at ".[\n]")
-              (not (smie-rule-sibling-p)))
+     (if (smie-rule-hanging-p)
          swift-indent-multiline-statement-offset))
 
     ;; Indent second line of the multi-line class



reply via email to

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