[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode f9122bb 208/459: Fix indentation for array
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode f9122bb 208/459: Fix indentation for array collection initializers. |
Date: |
Sun, 22 Aug 2021 13:59:28 -0400 (EDT) |
branch: externals/csharp-mode
commit f9122bbb85d9ffcdd15b3af1e6cb0b0d2968da72
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Fix indentation for array collection initializers.
Add test-case to the lot.
---
csharp-mode.el | 2 ++
test-files/indentation-tests.cs | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/csharp-mode.el b/csharp-mode.el
index 77eb5c6..d0ba8dd 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -486,6 +486,8 @@ to work properly with code that includes attributes.
"[A-Za-z_][[:alnum:]]*"
;; optional generic constraint
"\\(?:<\\(?:[[:alpha:]][[:alnum:]]*\\)\\(?:[,
]+[[:alpha:]][[:alnum:]]*\\)*>\\)?"
+ ;; optional array-specifier
+ "\\(?:\\[\\]\\)?"
;; spacing
"[\ t\n\f\v\r]*") nil)
(looking-at "[ \t\n\f\v\r]*{"))
diff --git a/test-files/indentation-tests.cs b/test-files/indentation-tests.cs
index 9715840..4fa4ff5 100644
--- a/test-files/indentation-tests.cs
+++ b/test-files/indentation-tests.cs
@@ -48,6 +48,16 @@ namespace Boo
with = new prop(),
};
+ var array1 = new ArrayList
+ {
+ 1, 2, 3, 4, 5
+ };
+
+ var array2 = new string[]
+ {
+ "a", "b", "c"
+ };
+
var map = new Dictionary<int,string> {
{ 1, "true" },
{ 2, "false" },
- [elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report namespace for all types, (continued)
- [elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report namespace for all types, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ed030e7 152/459: Ensure test-cases don't overlap., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c7932f9 156/459: Remove useless autoloads, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ee9125d 163/459: Fix looking-back warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f9e95d1 167/459: Ensure tests reproduce fontification bugs., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ca394f1 188/459: imenu: Fix indexing of methods in test-file., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c206dbc 191/459: extern is a modifier-keyword, not "other" keyword., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a8d8ef8 195/459: imenu: Index delegates, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 897c85a 197/459: imenu: Fix indexing of delegates., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode fe3ca7e 200/459: Inline square-parenthesis detection., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f9122bb 208/459: Fix indentation for array collection initializers.,
ELPA Syncer <=
- [elpa] externals/csharp-mode ebd67a1 209/459: Correctly indent nested generic object initializers, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5b89db2 088/459: Imenu: Correctly handle default-values in param-lists., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8ccafbc 092/459: remove unused rule and documentation, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0e333c3 090/459: fontify else, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f96cf8b 089/459: remove fontification of accessors and constructors, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c097a34 093/459: add async as a function modifier, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode dd6c930 102/459: Merge pull request #43 from wasamasa/fix-major-mode-definition, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 55fe188 101/459: Use `define-derived-mode`, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c6a4ea 096/459: Add info about customization to readme., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f80eace 098/459: Revert "Fix runtime warnings about obsolete Emacs-functions.", ELPA Syncer, 2021/08/22