[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 7169a3b 265/496: Fix class when empty (no insts
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 7169a3b 265/496: Fix class when empty (no insts) |
Date: |
Sun, 29 Aug 2021 11:33:48 -0400 (EDT) |
branch: elpa/swift-mode
commit 7169a3b9c020b4f20bc0fab09640348252ddaf06
Author: uk-ar <yuuki.ari@gmail.com>
Commit: uk-ar <yuuki.ari@gmail.com>
Fix class when empty (no insts)
---
swift-mode.el | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/swift-mode.el b/swift-mode.el
index edea55f..a695e5b 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -107,8 +107,8 @@
(top-level-st
("import" type)
(decl)
- ("ACCESSMOD" "class" class-decl-exp "class-{" class-level-sts "}")
- ("ACCESSMOD" "protocol" class-decl-exp "protocol-{" protocol-level-sts
"}")
+ ("ACCESSMOD" "class" class-decl-exp "{" class-level-sts "}")
+ ("ACCESSMOD" "protocol" class-decl-exp "{" protocol-level-sts "}")
)
(class-level-sts (class-level-st) (class-level-st ";" class-level-st))
@@ -278,11 +278,10 @@ We try to constraint those lookups by reasonable number
of lines.")
((and (looking-at "\n\\|\/\/") (swift-smie--implicit-semi-p))
(if (eolp) (forward-char 1) (forward-comment 1))
";")
-
- ((looking-at "{") (forward-char 1)
- (if (looking-back "\\(class\\|protocol\\) [^{]+{" (line-beginning-position
swift-smie--lookback-max-lines) t)
- (concat (match-string 1) "-{")
- "{"))
+ (t
+ (forward-comment (point))
+ (cond
+ ((looking-at "{") (forward-char 1) "{")
((looking-at "}") (forward-char 1) "}")
((looking-at ",") (forward-char 1) ",")
@@ -327,6 +326,7 @@ We try to constraint those lookups by reasonable number of
lines.")
"else"))
(t tok))))
))
+ ))
(defun swift-smie--backward-token ()
(let ((pos (point)))
@@ -336,10 +336,7 @@ We try to constraint those lookups by reasonable number of
lines.")
(swift-smie--implicit-semi-p))
";")
- ((eq (char-before) ?\{) (backward-char 1)
- (if (looking-back "\\(class\\|protocol\\) [^{]+"
(line-beginning-position swift-smie--lookback-max-lines) t)
- (concat (match-string 1) "-{")
- "{"))
+ ((eq (char-before) ?\{) (backward-char 1) "{")
((eq (char-before) ?\}) (backward-char 1) "}")
((eq (char-before) ?,) (backward-char 1) ",")
- [nongnu] elpa/swift-mode f193a82 205/496: defcustom types for swift-indent was incorrectly set to intergerp, (continued)
- [nongnu] elpa/swift-mode f193a82 205/496: defcustom types for swift-indent was incorrectly set to intergerp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a60e3fa 209/496: Don't indent chain of operators multiple times, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e539ba6 215/496: Improve support for the multi-line case statements, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 95e753b 226/496: Disable testing against emacs 24.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e898e7e 234/496: Merge pull request #91 from uk-ar/fix-indent-with-hanging-operator-after-comment, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a1d7a06 236/496: Merge pull request #88 from uk-ar/fix-indent-after-comment, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fd9ed20 244/496: Modify indents around comma to meet Xcode spec, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5e7d1b9 250/496: Update swift-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a2c0b6a 251/496: Merge pull request #98 from akoaysigod/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7709e04 256/496: Fix token for DECSPEC, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7169a3b 265/496: Fix class when empty (no insts),
ELPA Syncer <=
- [nongnu] elpa/swift-mode 391752f 272/496: Add test case for forward-list & backward-list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7ffd59d 273/496: Fix forward-list test by adding brackets, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3ce22b1 275/496: Remove needless code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c40887e 276/496: Merge pull request #108 from syohex/remove-needless-code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ade8e95 277/496: Use with-eval-after-load instead of eval-after-load, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a3bcb19 278/496: Merge pull request #109 from syohex/with-eval-after-load, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3aec61f 279/496: Update Emacs version requirement in README, ELPA Syncer, 2021/08/29
- [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