[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 848d088 310/496: Fix indentation after attribut
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 848d088 310/496: Fix indentation after attributes with arguments |
Date: |
Sun, 29 Aug 2021 11:33:57 -0400 (EDT) |
branch: elpa/swift-mode
commit 848d0886438c9868896c8991d40418166fddef10
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Fix indentation after attributes with arguments
---
swift-mode-lexer.el | 13 ++++++++++++-
test/swift-files/declarations.swift | 11 ++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el
index 64d91c4..6469890 100644
--- a/swift-mode-lexer.el
+++ b/swift-mode-lexer.el
@@ -283,7 +283,18 @@
t)
;; Supress implicit semicolon after attributes.
- ((string-prefix-p "@" (swift-mode:token:text previous-token)) nil)
+ ((string-prefix-p "@" (swift-mode:token:text previous-token))
+ nil)
+
+ ;; Supress implicit semicolon after attributes with arguments.
+ ((and
+ (eq (swift-mode:token:type previous-token) '\))
+ (save-excursion
+ (backward-list)
+ (string-prefix-p
+ "@"
+ (swift-mode:token:text (swift-mode:backward-token-simple)))))
+ nil)
;; Inserts implicit semicolon before keywords that behave like method
;; names.
diff --git a/test/swift-files/declarations.swift
b/test/swift-files/declarations.swift
index 3f9549b..3a353de 100644
--- a/test/swift-files/declarations.swift
+++ b/test/swift-files/declarations.swift
@@ -29,7 +29,7 @@ class Foo {
=
xx
- @ABC
+ @ABC(aaa)
final
unowned(safe)
fileprivate
@@ -234,6 +234,15 @@ func
foo()
}
+func
+ foo()
+ ->
+ @A(aaa)
+ B {
+ foo()
+ foo()
+}
+
// Enumeration declarations
fileprivate
- [nongnu] elpa/swift-mode 6793bd9 281/496: Indent according to operators precedence, (continued)
- [nongnu] elpa/swift-mode 6793bd9 281/496: Indent according to operators precedence, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode add2ae9 282/496: Merge pull request #111 from uk-ar/indent-according-to-prec, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8889a6a 285/496: Merge pull request #112 from uk-ar/fix-multiline-expressions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 064d4ee 287/496: Update acknowledgments section in readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b7cc115 293/496: Merge pull request #116 from syohex/use-cl-lib, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e9648b1 296/496: Use .el for file extension in distributed package., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1563e8b 300/496: Bump the development version to 0.5.0-snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a5e1acf 297/496: Merge pull request #122 from N4tr0n/make-install-fix-issue120, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cfaeaff 294/496: Update MELPA URL, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9471669 304/496: Merge taku0/swift3-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 848d088 310/496: Fix indentation after attributes with arguments,
ELPA Syncer <=
- [nongnu] elpa/swift-mode cad72a1 306/496: Fix a link in README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0a75736 317/496: Fix indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c1f7ec2 321/496: Fix indentation of switch-case body, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7423f68 324/496: Simplify code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 58f31cc 340/496: Speed-up indentation for colon, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0b1f29d 334/496: Fix indentation of setter, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 812d202 341/496: Fix REPL prompt corruption, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode f755479 333/496: Fix anchor highlighting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 56ee9b2 359/496: Add comment style option, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode dba539e 394/496: Tweak and clean-up font-lock, ELPA Syncer, 2021/08/29