[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 2293e78 481/496: Fix indentation of throws with
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 2293e78 481/496: Fix indentation of throws without result type |
Date: |
Sun, 29 Aug 2021 11:34:32 -0400 (EDT) |
branch: elpa/swift-mode
commit 2293e78c2c4660e6f3559411f649c4a34eb7e8d8
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Fix indentation of throws without result type
Example:
```swift
func f() throws
func g(f: () throws -> Int) rethrows
func h()
```
Fix https://github.com/swift-emacs/swift-mode/issues/172.
---
swift-mode-lexer.el | 2 +-
test/swift-files/indent/declarations.swift | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el
index 00a4c23..f9641bf 100644
--- a/swift-mode-lexer.el
+++ b/swift-mode-lexer.el
@@ -430,7 +430,7 @@ Return nil otherwise."
;; Suppress implicit semicolon around keywords that cannot start or end
;; statements.
(member (swift-mode:token:text previous-token)
- '("some" "inout" "throws" "rethrows" "in" "where"))
+ '("some" "inout" "in" "where"))
(member (swift-mode:token:text next-token)
'("some" "inout" "throws" "rethrows" "in" "where")))
nil)
diff --git a/test/swift-files/indent/declarations.swift
b/test/swift-files/indent/declarations.swift
index 17dc5b3..1d5e0ba 100644
--- a/test/swift-files/indent/declarations.swift
+++ b/test/swift-files/indent/declarations.swift
@@ -573,7 +573,9 @@ struct Foo
// Protocol declarations
protocol Foo {
- func foo(x, y) throws -> (A, B)
+ func foo(x: Int, y: Int) throws -> (A, B)
+ func bar(x: Int) throws
+ func baz(x: () throws -> Int) rethrows
init<A, B>(x: Int) throws
where
A: C
- [nongnu] elpa/swift-mode 62cf880 437/496: Update electric indent inside multiline comments, (continued)
- [nongnu] elpa/swift-mode 62cf880 437/496: Update electric indent inside multiline comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 04c8a62 442/496: Fix beginning-of-defun hanging at the beginning of buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 286b46e 459/496: Highlight #filePath, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fa22f12 461/496: Add tests for multiple trailing closures, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2ab9ea1 458/496: Bump version to 8.0.2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a067fe7 454/496: Add travis emacs version 26.2 and 26.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 29759f5 456/496: Fix indentation of generic-parameter-clause, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5eb806b 470/496: Fix GitHub Action, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9757df9 475/496: Improve regular expression to avoid false positives, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5074a02 480/496: Fix font-lock of successive identifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2293e78 481/496: Fix indentation of throws without result type,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 19c956c 482/496: Fix GitHub Action, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 95ff004 479/496: Fix indentation of closures inside condition-list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode db3603a 489/496: Highlight async/await, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 4a5f577 488/496: Tweak comments and style, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 86043c2 093/496: Define electric-indent characters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b298842 094/496: Merge pull request #26 from ap4y/electric_indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 027522d 090/496: Merge pull request #23 from ap4y/flycheck_improvements, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 20e4ecf 099/496: Merge pull request #27 from ap4y/highlight_declaration_with_destructuring, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 53f9042 100/496: Rename swift-mode--font-lock-defaults to swift-font-lock-keywords and, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 72eb603 105/496: Use semver friendly version number, ELPA Syncer, 2021/08/29