branch: elpa/d-mode
commit f2b4aeca8961ba7db65bbde8192e005021ed9f72
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fix fontification of "a in b" expressions
Don't put "in" in c-modifier-kwds for this reason, as it's also an
infix operator.
---
d-mode.el | 6 +++---
tests/fonts.d | 3 +++
tests/fonts.d.html | 3 +++
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 53b2894..e4ac593 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: 201909081425
+;; Version: 201909081431
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "24.3"))
@@ -252,7 +252,7 @@ The expression is added to `compilation-error-regexp-alist'
and
;; Keywords that can prefix normal declarations of identifiers
(c-lang-defconst c-modifier-kwds
d '("abstract" "deprecated" "extern"
- "final" "in" "out" "lazy" "mixin" "override" "private"
+ "final" "out" "lazy" "mixin" "override" "private"
"protected" "public" "ref" "scope" "static" "synchronized"
"volatile" "__vector"))
@@ -385,7 +385,7 @@ The expression is added to `compilation-error-regexp-alist'
and
(c-lang-defconst c-other-kwds
;; Keywords not accounted for by any other `*-kwds' language constant.
- d '("__gshared" "__traits" "assert" "cast" "is" "nothrow" "pure" "ref"
+ d '("__gshared" "__traits" "assert" "cast" "in" "is" "nothrow" "pure" "ref"
"sizeof" "typeid" "typeof"))
diff --git a/tests/fonts.d b/tests/fonts.d
index 3c4ce87..27601ae 100644
--- a/tests/fonts.d
+++ b/tests/fonts.d
@@ -3,4 +3,7 @@
void main()
{
assert(true);
+
+ string[string] aa; string s;
+ assert(s in aa);
}
diff --git a/tests/fonts.d.html b/tests/fonts.d.html
index 8096111..6582a32 100644
--- a/tests/fonts.d.html
+++ b/tests/fonts.d.html
@@ -3,4 +3,7 @@
<span class="type">void</span> <span class="function-name">main</span>()
{
<span class="keyword">assert</span>(<span class="constant">true</span>);
+
+ <span class="type">string</span>[<span class="type">string</span>]
<span class="variable-name">aa</span>; <span class="type">string</span> <span
class="variable-name">s</span>;
+ <span class="keyword">assert</span>(s <span class="keyword">in</span>
aa);
}