[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 1bce6c4 191/346: Somewhat improve fontification of
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 1bce6c4 191/346: Somewhat improve fontification of module names |
Date: |
Sun, 29 Aug 2021 11:00:28 -0400 (EDT) |
branch: elpa/d-mode
commit 1bce6c416833df4d95293d974cbdd3c3833bdcfc
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Somewhat improve fontification of module names
Fixes highlighting of the final module part in module and import
declarations, but not the package parts preceding them.
cc-mode seems to be lacking the necessary constructs to handle this
cleanly.
Partially fixes issue #54.
---
d-mode-test.el | 1 +
d-mode.el | 8 ++++----
tests/I0054.d | 16 ++++++++++++++++
tests/I0054.d.html | 16 ++++++++++++++++
4 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index de4f69f..f915730 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -310,6 +310,7 @@ is expected to succeed, and nil otherwise."
(d-test-deftest i0035 "tests/I0035.d" (version< "24.4" emacs-version))
(d-test-deftest i0039 "tests/I0039.d" (version< "24.4" emacs-version))
(d-test-deftest i0049 "tests/I0049.d" t)
+(d-test-deftest i0054 "tests/I0054.d" t)
(d-test-deftest i0064 "tests/I0064.d" t)
(d-test-deftest i0069 "tests/I0069.txt" t)
(d-test-deftest i0072 "tests/I0072.txt" t)
diff --git a/d-mode.el b/d-mode.el
index 46e561f..dffe457 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: 201908270026
+;; Version: 201908281339
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "24.3"))
@@ -305,10 +305,10 @@ The expression is added to
`compilation-error-regexp-alist' and
;; d '("in" "out" "body"))
(c-lang-defconst c-type-list-kwds
- d '("import"))
+ d nil)
(c-lang-defconst c-ref-list-kwds
- d '("module"))
+ d '("import" "module"))
(c-lang-defconst c-colon-type-list-kwds
;; Keywords that may be followed (not necessarily directly) by a colon
@@ -372,7 +372,7 @@ The expression is added to `compilation-error-regexp-alist'
and
d nil)
(c-lang-defconst c-other-decl-kwds
- d '("module" "import"))
+ d nil)
(c-lang-defconst c-other-kwds
;; Keywords not accounted for by any other `*-kwds' language constant.
diff --git a/tests/I0054.d b/tests/I0054.d
new file mode 100644
index 0000000..f146247
--- /dev/null
+++ b/tests/I0054.d
@@ -0,0 +1,16 @@
+// #run: (d-test-fontification)
+
+module aaa;
+
+import bbb;
+
+// FIXME:
+
+module aaa.bbb.ccc;
+
+import aaa.bbb;
+import aaa.Bbb;
+import aaa.bbb.ccc;
+import Aaa.Bbb.ccc;
+import Aaa.Bbb.Ccc;
+import aaa.bbb.Ccc;
diff --git a/tests/I0054.d.html b/tests/I0054.d.html
new file mode 100644
index 0000000..33b7df8
--- /dev/null
+++ b/tests/I0054.d.html
@@ -0,0 +1,16 @@
+<span class="comment-delimiter">// </span><span class="comment">#run:
(d-test-fontification)
+</span>
+<span class="keyword">module</span> <span class="constant">aaa</span>;
+
+<span class="keyword">import</span> <span class="constant">bbb</span>;
+
+<span class="comment-delimiter">// </span><span class="comment">FIXME:
+</span>
+<span class="keyword">module</span> aaa.bbb.<span class="constant">ccc</span>;
+
+<span class="keyword">import</span> aaa.<span class="constant">bbb</span>;
+<span class="keyword">import</span> <span class="constant">aaa</span>.<span
class="constant">Bbb</span>;
+<span class="keyword">import</span> aaa.bbb.<span class="constant">ccc</span>;
+<span class="keyword">import</span> <span
class="constant">Aaa</span>.Bbb.<span class="constant">ccc</span>;
+<span class="keyword">import</span> <span class="constant">Aaa</span>.<span
class="constant">Bbb</span>.<span class="constant">Ccc</span>;
+<span class="keyword">import</span> <span class="constant">aaa</span>.<span
class="constant">bbb</span>.<span class="constant">Ccc</span>;
- [nongnu] elpa/d-mode 23d7a1a 148/346: tests: Fix testing compilation-mode buffers with Emacs 26, (continued)
- [nongnu] elpa/d-mode 23d7a1a 148/346: tests: Fix testing compilation-mode buffers with Emacs 26, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a731ae6 157/346: Fix imenu for functions with parameter types containing parens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode ab1057f 159/346: Fix imenu for functions with tail qualifiers on their own line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f61e72c 173/346: Drop support for Emacs < 24.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 09745ba 175/346: Merge pull request #87 from CyberShadow/emacs-24-plus, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode cfd1d08 180/346: Use rx-to-string instead of rx-form to support Emacs master (#97), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode af6dbfa 183/346: Generalize StorageClass/VisibilityAttribute parsing in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2964263 184/346: Fix imenu with alias templates, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 71e8bda 196/346: Improve constructor handling and fix constructor contract indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 28810ef 194/346: Add test for function contracts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1bce6c4 191/346: Somewhat improve fontification of module names,
ELPA Syncer <=
- [nongnu] elpa/d-mode b413942 198/346: Tighten K&R region detection, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 07cb4d0 199/346: Add d-lineup-arglists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode d3ceb14 200/346: Make d--imenu-rx-def-start a compile-time constant, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0b6a089 217/346: .travis.yml: Try using a emacs-travis.mk which does not use FTP, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 653661e 220/346: Fix parsing qualified types, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f07f365 201/346: Fix fontification of constructor parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fd8e70a 209/346: Partially implement D type modifiers (const/immutable/etc.), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8647147 208/346: Fix tests' minimum Emacs versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9ad04a1 213/346: Fix parsing/fontification of some expressions with periods, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5146f2d 215/346: Clear some cc-mode constants, ELPA Syncer, 2021/08/29