emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/d-mode df9c8a1 322/346: Fontify types in casts


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode df9c8a1 322/346: Fontify types in casts
Date: Sun, 29 Aug 2021 11:00:53 -0400 (EDT)

branch: elpa/d-mode
commit df9c8a15410af8934dc678c6fa0301e266ef8115
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>

    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 <russel@winder.org.uk>
 ;;              Vladimir Panteleev <vladimir@thecybershadow.net>
 ;; 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">&quot;&quot;</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();
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]