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

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

[nongnu] elpa/swift-mode ae4f08b 253/496: Correct implicit semicolon rul


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode ae4f08b 253/496: Correct implicit semicolon rule for in keyword
Date: Sun, 29 Aug 2021 11:33:46 -0400 (EDT)

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

    Correct implicit semicolon rule for in keyword
    
    fixes #102
---
 swift-mode.el             |  2 +-
 test/indentation-tests.el | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/swift-mode.el b/swift-mode.el
index 561a00b..5cb0293 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -233,7 +233,7 @@
              ;; ??, is? and as? are operators
              (looking-back "[?][?]\\|as[?]\\|is[?]" (- (point) 3) t)
              ;; "in" operator in closure
-             (looking-back "in" (- (point) 2) t)
+             (looking-back "\\bin" (- (point) 3) t)
              ;; Characters placed on the second line in multi-line expression
              (save-excursion
                (forward-comment (buffer-size))
diff --git a/test/indentation-tests.el b/test/indentation-tests.el
index 5535a70..3abd8be 100644
--- a/test/indentation-tests.el
+++ b/test/indentation-tests.el
@@ -634,6 +634,17 @@ import Foo
 |import Bar
 ")
 
+(check-indentation indents-import-statements/2
+  "
+import Darwin
+    |class Test {
+}
+" "
+import Darwin
+|class Test {
+}
+")
+
 (check-indentation indents-class-declaration/1
   "
 class Foo {



reply via email to

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