File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ END is the point after the token."
258258 ; ; Suppress implicit semicolon after keywords that cannot end statements.
259259 ((member (swift-mode:token:text previous-token)
260260 '(" while" " for" " switch" " case" " default" " catch" " if" " guard"
261- " let" " var" " throw" " import" " return " ))
261+ " let" " var" " throw" " import" ))
262262 nil )
263263
264264 ; ; Inserts implicit semicolon before keywords that starts a new
@@ -268,6 +268,10 @@ END is the point after the token."
268268 " guard" " let" " var" " throw" " import" " return" ))
269269 t )
270270
271+ ; ; Suppress implicit semicolon after return.
272+ ((equal (swift-mode:token:text previous-token) " return" )
273+ nil )
274+
271275 ; ; Inserts implicit semicolon before `while' unless it is part of
272276 ; ; `repeat...while' .
273277 ((equal (swift-mode:token:text next-token) " while" )
Original file line number Diff line number Diff line change @@ -897,6 +897,13 @@ default:
897897 }
898898}
899899
900+ switch foo {
901+ case 1 :
902+ return
903+ case 2 :
904+ bar ( )
905+ }
906+
900907// swift-mode:test:eval (setq-local swift-mode:switch-case-offset 2)
901908
902909switch foo {
You can’t perform that action at this time.
0 commit comments