[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 06fb0ff 189/346: Fix indentation of enums with a ba
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 06fb0ff 189/346: Fix indentation of enums with a base type |
Date: |
Sun, 29 Aug 2021 11:00:28 -0400 (EDT) |
branch: elpa/d-mode
commit 06fb0ffbf2754e0124b0549db97b26d7dc084df9
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Fix indentation of enums with a base type
Enable c-recognize-post-brace-list-type-p.
Fixes #19.
---
d-mode-test.el | 1 +
d-mode.el | 7 ++++++-
tests/I0019.d | 7 +++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index a000689..de4f69f 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -303,6 +303,7 @@ is expected to succeed, and nil otherwise."
;; Run the tests
(d-test-deftest imenu "tests/imenu.d" t)
(d-test-deftest fonts "tests/fonts.d" t)
+(d-test-deftest i0019 "tests/I0019.d" (version< "25.1" emacs-version))
(d-test-deftest i0021 "tests/I0021.d" t)
(d-test-deftest i0026 "tests/I0026.d" t)
(d-test-deftest i0030 "tests/I0030.d" t)
diff --git a/d-mode.el b/d-mode.el
index 43d4356..185e215 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <russel@winder.org.uk>
;; Vladimir Panteleev <vladimir@thecybershadow.net>
;; Created: March 2007
-;; Version: 201908270011
+;; Version: 201908270026
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "24.3"))
@@ -380,6 +380,11 @@ The expression is added to
`compilation-error-regexp-alist' and
"sizeof" "typeid" "typeof"))
+(c-lang-defconst c-recognize-post-brace-list-type-p
+ ;; Set to t when we recognize a colon and then a type after an enum,
+ ;; e.g., enum foo : int { A, B, C };"
+ d t)
+
(defcustom d-font-lock-extra-types nil
"*List of extra types (aside from the type keywords) to recognize in D mode.
diff --git a/tests/I0019.d b/tests/I0019.d
new file mode 100644
index 0000000..f16181c
--- /dev/null
+++ b/tests/I0019.d
@@ -0,0 +1,7 @@
+// #run: (d-test-indent)
+
+enum OtherValues2 : uint {
+ a = 2u,
+ b = 4u,
+ c
+}
- [nongnu] elpa/d-mode e26260c 156/346: Fix imenu for functions with multiple tail qualifiers, (continued)
- [nongnu] elpa/d-mode e26260c 156/346: Fix imenu for functions with multiple tail qualifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fda6318 165/346: Fix imenu for structs/classes with protection specifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode d7f46a2 166/346: Add aliases to imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 98af62e 167/346: tests: Add test for #26 variant with compile- and run-time argument lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a97c92c 168/346: d-mode: Remove 'bit' from keyword list., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 398f185 171/346: Merge pull request #85 from MartinNowak/fix49, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8cf1ec5 174/346: Work around Emacs bug #18845, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f384327 179/346: Fix imenu with typename ending with keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e809bd1 181/346: Fix imenu with conditional non-function declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5e08129 192/346: Fix indentation of function out contracts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 06fb0ff 189/346: Fix indentation of enums with a base type,
ELPA Syncer <=
- [nongnu] elpa/d-mode 1afddc7 190/346: Fix a typo in a regex, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 382a677 195/346: Use c-major-mode-is, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9edcfbd 197/346: Remove unused bits from d-in-knr-argdecl, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 175c6e5 193/346: Fix indentation of function constraints/contracts?, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5fdba4e 202/346: Add pragma keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 51b1af1 203/346: Fix K&R region detection and body-less function declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b5fb492 204/346: Fix fontification of manifest (enum) constants, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e52434e 218/346: d-mode-test.el: Save actual result to file in case of mismatch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 609816b 219/346: tests: Move d-forward-type tests to new test file, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4d9f9ce 211/346: Drop support for Emacs 24, ELPA Syncer, 2021/08/29