[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 75f5214 364/496: Cleanup code
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 75f5214 364/496: Cleanup code |
Date: |
Sun, 29 Aug 2021 11:34:08 -0400 (EDT) |
branch: elpa/swift-mode
commit 75f5214ed4c363a8155aab0a701cc3c23432b9a0
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Cleanup code
---
swift-mode-indent.el | 15 +++++++--------
test/swift-files/declarations.swift | 6 +++---
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/swift-mode-indent.el b/swift-mode-indent.el
index 76d05fc..07ce0eb 100644
--- a/swift-mode-indent.el
+++ b/swift-mode-indent.el
@@ -104,12 +104,12 @@ Intended for debugging."
;;; Constants and variables
(defconst swift-mode:statement-parent-tokens
- '(implicit-\; \; case-: { \( \[ anonymous-function-parameter-in)
+ '(implicit-\; \; case-: { anonymous-function-parameter-in)
"Parent tokens for statements.")
(defconst swift-mode:expression-parent-tokens
(append swift-mode:statement-parent-tokens
- '(\, < supertype-: "where" "if" "guard" "while" "for" "catch"
+ '(\, < \( \[ supertype-: "where" "if" "guard" "while" "for" "catch"
string-chunk-before-interpolated-expression))
"Parent tokens for expressions.")
@@ -274,7 +274,8 @@ declaration and its offset is `swift-mode:basic-offset'."
'swift-mode:matching-parenthesis))
(forward-char 2)
(swift-mode:backward-string-chunk)
- (swift-mode:calculate-indent-after-beginning-of-interpolated-expression
0))
+ (swift-mode:calculate-indent-after-beginning-of-interpolated-expression
+ 0))
;; Before , on the current line
((and next-is-on-current-line (eq next-type '\,))
@@ -494,8 +495,7 @@ declaration and its offset is `swift-mode:basic-offset'."
(swift-mode:find-and-align-with-parents '("for")))
(t
(swift-mode:find-and-align-with-parents
- (append swift-mode:statement-parent-tokens
- '(<))
+ (append swift-mode:statement-parent-tokens '(<))
swift-mode:multiline-statement-offset)))))
;; After "where"
@@ -579,8 +579,7 @@ declaration and its offset is `swift-mode:basic-offset'."
swift-mode:multiline-statement-offset
swift-mode:multiline-statement-offset))
(swift-mode:find-and-align-with-parents
- (append swift-mode:statement-parent-tokens
- '(< "for"))
+ (append swift-mode:statement-parent-tokens '(< "for"))
swift-mode:multiline-statement-offset)))))
;; After implicit-\; or ;
@@ -1072,7 +1071,7 @@ comma at eol."
(let ((pos (point))
(parent (swift-mode:backward-sexps-until
;; Includes "if" to stop at the last else-if.
- (cons "if" (cons '< swift-mode:statement-parent-tokens))
+ (append swift-mode:statement-parent-tokens '("if" \( \[ <))
(if utrecht-sytle nil '(\,))
(if utrecht-sytle '(\,) nil))))
(cond
diff --git a/test/swift-files/declarations.swift
b/test/swift-files/declarations.swift
index 88eb98f..c0a776c 100644
--- a/test/swift-files/declarations.swift
+++ b/test/swift-files/declarations.swift
@@ -225,12 +225,12 @@ private
func
foo<A, B>(
x:
- Int
+ Int,
y:
Int
=
- 1
- z
+ 1,
+ z,
w:
Int
...
- [nongnu] elpa/swift-mode b135df3 316/496: Fix output messages of the test, (continued)
- [nongnu] elpa/swift-mode b135df3 316/496: Fix output messages of the test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7837c90 319/496: Fix indentation around "where" and "catch", ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 42a209c 322/496: Fix indentation of guard, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ab9f414 320/496: Fix indentation of close curly brace of switch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 97d86cd 326/496: Tweak test runner, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ea77cf9 328/496: Add comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 6cd2948 342/496: Bump version to 2.2.1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7e78225 336/496: Bump version to 2.2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1868590 348/496: Add build/debug command, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a6d00b5 352/496: Simplify code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 75f5214 364/496: Cleanup code,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 7a9cf18 382/496: Fix beginning/end-of-sentence, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 19e6974 371/496: Abstract syntax-ppss, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 69efea4 386/496: Add `current-defun-name`, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7739e49 387/496: Bump version to 4.1.0, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ada5576 389/496: Merge pull request #144 from nhojb/which_function_mode_fix, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 4e22279 390/496: Bump version to 4.1.1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0e6b044 408/496: Make highlighting symbols in standard library optional, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 71c82e9 418/496: Add compilation before testing, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1759977 440/496: Fix typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 323bb97 457/496: Update copyright notices, ELPA Syncer, 2021/08/29