[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode 085522f 044/192: Properly indent continued {} li
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode 085522f 044/192: Properly indent continued {} lines as well. |
Date: |
Sun, 29 Aug 2021 11:01:47 -0400 (EDT) |
branch: elpa/dart-mode
commit 085522fa82cca30cc0c094c1ed4b86a3a38659bc
Author: Nathan Weizenbaum <nweiz@google.com>
Commit: Nathan Weizenbaum <nweiz@google.com>
Properly indent continued {} lines as well.
---
dart-mode.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/dart-mode.el b/dart-mode.el
index 88f4136..b421df0 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -239,8 +239,10 @@ This could be either an actual brace-list or an optional
parameter."
;; If we're in a function definition with optional arguments, indent as if
;; the brace wasn't there. Currently this misses the in-function function
;; definition, but that's probably acceptable.
- (if (assq 'topmost-intro
- (save-excursion (goto-char anchor) (c-guess-basic-syntax)))
+ (if (and
+ (save-excursion (backward-up-list) (eq (char-after) ?\[))
+ (assq 'topmost-intro
+ (save-excursion (goto-char anchor) (c-guess-basic-syntax))))
'++
;; Otherwise, we're in an actual brace list, in which case only indent
;; once.
@@ -334,10 +336,14 @@ SYNTAX-GUESS is the output of `c-guess-basic-syntax'."
(backward-up-list)
(when (= (char-after) ?\{)
(forward-char)
- (c-forward-comments)
- (back-to-indentation)
- (setq ad-return-value `((brace-list-entry ,(point))))
- t)))))))))))
+ (let ((contp (not (looking-at "\\s-*$"))))
+ (c-forward-comments)
+ (back-to-indentation)
+ (setq ad-return-value
+ `((,(if contp 'dart-brace-list-cont-nonempty
+ 'brace-list-entry)
+ ,(point))))
+ t))))))))))))
(defadvice c-inside-bracelist-p (after dart-inside-bracelist-p activate)
;; This function is only called within c-guess-basic-syntax. Since we do all
- [nongnu] elpa/dart-mode c6478e8 026/192: Add a dart c style., (continued)
- [nongnu] elpa/dart-mode c6478e8 026/192: Add a dart c style., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode ff905a9 056/192: Merge pull request #3 from patefacio/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode f35222d 057/192: Fix an error in the flymake hook., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode c6969ba 061/192: Add some support for the Dart formatter., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode be14d27 029/192: Dart doesn't use . as an identifier op., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d1d4d88 031/192: Add more known bugs., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d39043f 032/192: Fix an offset., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 5e9c9b9 034/192: Add a known bug., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode cb7d85d 033/192: Handle member initializers a little better., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 53155c1 036/192: Fix map literal indentation when cc-mode thinks it's a defun., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 085522f 044/192: Properly indent continued {} lines as well.,
ELPA Syncer <=
- [nongnu] elpa/dart-mode 1bba413 046/192: Bump version to 0.7., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 592192c 054/192: Bump version to 0.9., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode aba5eed 064/192: 'dart' must be found to find the analysis server snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1b01681 065/192: Merge pull request #14 from hterkelsen/issue13, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 351db28 072/192: Lexically scope the library., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1ccf8a0 073/192: Better handling and of analysis server messages., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a4d7a3c 075/192: Declare compatibility with flycheck 0.23., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1b75622 079/192: Only mention marmalade in the README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e338148 078/192: Get rid of busted flymake and formatter support., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 05fbd30 081/192: Merge pull request #24 from phst/master, ELPA Syncer, 2021/08/29