branch: elpa/d-mode
commit df9c8a15410af8934dc678c6fa0301e266ef8115
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fontify types in casts
---
d-mode.el | 4 ++--
tests/fonts.d | 1 +
tests/fonts.d.html | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 89d84eb..8987b78 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <[email protected]>
;; Vladimir Panteleev <[email protected]>
;; Created: March 2007
-;; Version: 201911121459
+;; Version: 201911121951
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -324,7 +324,7 @@ operators."
(c-lang-defconst c-paren-type-kwds
;; Keywords that may be followed by a parenthesis expression containing
;; type identifiers separated by arbitrary tokens.
- d (append (list "delete" "throw")
+ d (append (list "delete" "throw" "cast")
(c-lang-const d-type-modifier-kwds)))
;; D: Like `c-regular-keywords-regexp', but contains keywords which
diff --git a/tests/fonts.d b/tests/fonts.d
index 666ab3e..533eef0 100644
--- a/tests/fonts.d
+++ b/tests/fonts.d
@@ -63,5 +63,6 @@ void fun()
void fun()
{
if (a) {}
+ auto x = cast(T)y;
return gun();
}
diff --git a/tests/fonts.d.html b/tests/fonts.d.html
index 8ae7ce7..e26b7b7 100644
--- a/tests/fonts.d.html
+++ b/tests/fonts.d.html
@@ -63,5 +63,6 @@ write(s ~ <span class="string">""</span>);
<span class="type">void</span> <span class="function-name">fun</span>()
{
<span class="keyword">if</span> (a) {}
+ <span class="keyword">auto</span> <span class="variable-name">x</span>
= <span class="keyword">cast</span>(<span class="type">T</span>)y;
<span class="keyword">return</span> gun();
}