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

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

[nongnu] elpa/swift-mode b6d0351 338/496: Fix indentation of switch


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode b6d0351 338/496: Fix indentation of switch
Date: Sun, 29 Aug 2021 11:34:02 -0400 (EDT)

branch: elpa/swift-mode
commit b6d0351e293c7df4e0471706ed361b8c680cd659
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Fix indentation of switch
---
 swift-mode-lexer.el               | 2 +-
 test/swift-files/statements.swift | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el
index 275a319..b44f977 100644
--- a/swift-mode-lexer.el
+++ b/swift-mode-lexer.el
@@ -456,7 +456,7 @@ That is supertype declaration or type declaration of let or 
var."
      ;; FIXME: mutual dependency
      (swift-mode:token:text
       (swift-mode:backward-sexps-until
-       '(implicit-\; \; { \( \[ "case" "default" 'case-:)))
+       '(implicit-\; \; { \( \[ "case" "default" case-:)))
      '("case" "default"))))
 
 (defun swift-mode:anonyous-parameter-in-p ()
diff --git a/test/swift-files/statements.swift 
b/test/swift-files/statements.swift
index f46cd24..9146fa8 100644
--- a/test/swift-files/statements.swift
+++ b/test/swift-files/statements.swift
@@ -904,6 +904,12 @@ case 2:
     bar()
 }
 
+switch foo {
+case 1:
+    var x: Int = 1
+    var y: Int = 2
+}
+
 // swift-mode:test:eval (setq-local swift-mode:switch-case-offset 2)
 
 switch foo {



reply via email to

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