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

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

[nongnu] elpa/swift-mode e5f28f8 268/496: Fix case-: for default


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode e5f28f8 268/496: Fix case-: for default
Date: Sun, 29 Aug 2021 11:33:49 -0400 (EDT)

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

    Fix case-: for default
---
 swift-mode.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/swift-mode.el b/swift-mode.el
index dfc82bb..d14cd9f 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -286,8 +286,8 @@ We try to constraint those lookups by reasonable number of 
lines.")
 
    ((looking-at ",") (forward-char 1) ",")
    ((looking-at ":") (forward-char 1)
-    ;; look-back until "case", ":", "{", ";"
-    (if (looking-back "case[\n\t ][^:{;]+:")
+    ;; look-back until "case", "default", ":", "{", ";"
+    (if (looking-back "\\(case[\n\t ][^:{;]+\\|default[\n\t ]*\\):")
         "case-:"
       ":"))
 
@@ -342,8 +342,8 @@ We try to constraint those lookups by reasonable number of 
lines.")
 
      ((eq (char-before) ?,) (backward-char 1) ",")
      ((eq (char-before) ?:) (backward-char 1)
-      ;; look-back until "case", ":", "{", ";"
-      (if (looking-back "case[\n\t ][^:{;]+")
+      ;; look-back until "case", "default", ":", "{", ";"
+      (if (looking-back "\\(case[\n\t ][^:{;]+\\|default[\n\t ]*\\)")
           "case-:"
         ":"))
 



reply via email to

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