Emacs support for Apple's Swift programming language.
consume
operator to end the lifetime of a variable binding
https://github.com/apple/swift-evolution/blob/main/proposals/0366-move-function.md
borrowing
and consuming
parameter ownership modifiers
https://github.com/apple/swift-evolution/blob/main/proposals/0377-parameter-ownership-modifiers.md
New access modifier: package
https://github.com/apple/swift-evolution/blob/main/proposals/0386-package-access-modifier.md
Noncopyable structs and enums https://github.com/apple/swift-evolution/blob/main/proposals/0390-noncopyable-structs-and-enums.md
Value and Type Parameter Packs https://github.com/apple/swift-evolution/blob/main/proposals/0393-parameter-packs.md https://github.com/apple/swift-evolution/blob/main/proposals/0398-variadic-types.md https://github.com/apple/swift-evolution/blob/main/proposals/0399-tuple-of-value-pack-expansion.md
Init Accessors https://github.com/apple/swift-evolution/blob/main/proposals/0400-init-accessors.md
Macros https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md https://github.com/apple/swift-evolution/blob/main/proposals/0389-attached-macros.md https://github.com/apple/swift-evolution/blob/main/proposals/0397-freestanding-declaration-macros.md https://github.com/apple/swift-evolution/blob/main/proposals/0402-extension-macros.md
Bug fixes and CI improvements.
Thanks @jpgrayson and @nhojb.
hasFeature
https://github.com/apple/swift-evolution/blob/main/proposals/0362-piecemeal-future-features.md
hasAttribute
https://github.com/apple/swift-evolution/blob/main/proposals/0367-conditional-attributes.md
before
https://github.com/apple/swift-evolution/blob/main/proposals/0376-function-back-deployment.md
if
expresison and switch
expression (Swift 5.9).
https://github.com/apple/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md
async let
#unavailable
keyword
noasync
keyword
fill-paragraph
, fill-region
, and auto filling in comments and strings, based on woolsweater's work.
/* aaa bbb ccc */
↓↑
/*
aaa
bbb
ccc
*/
swift-mode:fill-paragraph-entire-comment-or-string
is non-nil, fill-paragraph
fills the entire comment.comment-fill-column
is defined, it is used in comments rather than fill-column
.Function names are now correctly faced with swift-mode:function-name-face
.
Fixes #174.
Support Swift 5.5 features not included in v8.3.0:
async let
nonisolated
/isolated
get async throws
async
/await
and actor
.M-j
and C-M-j
for Emacs 27.swift-mode:debug-ios-app
for newer Xcode.Thanks @jcs090218, @woolsweater, and @danielmartin.
If swift-mode:switch-case-offset
is equal to or greater than swift-mode:basic-offset
, the body of switch statements are indented to swift-mode:switch-case-offset + swift-mode:basic-offset
.
Before:
switch foo {
case 1:
print(1)
default:
print("other")
}
After:
switch foo {
case 1:
print(1)
default:
print("other")
}
Thanks @woolsweater .