branch: elpa/swift-mode
commit e5f28f8a274b1a94bc8e1ad4b2e9304644497ad5
Author: uk-ar <[email protected]>
Commit: uk-ar <[email protected]>
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-:"
":"))