branch: elpa/d-mode
commit 4851fc2e3e6e672308ac3be73c3cae18318b6bb6
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fix fontification of "enum" in string literals
Regression from previous fix.
---
d-mode.el | 4 ++--
tests/fonts.d | 2 ++
tests/fonts.d.html | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index d4ba08a..b942c9c 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: 201911071815
+;; Version: 201911071821
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -701,7 +701,7 @@ Currently handles `-delimited string literals."
(defun d-font-lock-enum-body (limit)
"Modified version of `c-font-lock-enum-body' for d-mode." ;;
checkdoc-params: limit
- (while (search-forward-regexp c-enum-clause-introduction-re limit t)
+ (while (c-syntactic-re-search-forward c-enum-clause-introduction-re limit t)
(when (save-excursion
(backward-char)
(when (c-backward-over-enum-header)
diff --git a/tests/fonts.d b/tests/fonts.d
index 76a5a0c..e73f593 100644
--- a/tests/fonts.d
+++ b/tests/fonts.d
@@ -21,3 +21,5 @@ scope(exit) fun();
scope(exit) void fun();
@property empty() { return false; }
+
+auto s = "enum Type {}";
diff --git a/tests/fonts.d.html b/tests/fonts.d.html
index ea1d543..d448849 100644
--- a/tests/fonts.d.html
+++ b/tests/fonts.d.html
@@ -21,3 +21,5 @@
<span class="keyword">scope</span>(exit) <span class="type">void</span> <span
class="function-name">fun</span>();
<span class="c-annotation-face">@property</span> <span
class="function-name">empty</span>() { <span class="keyword">return</span>
<span class="constant">false</span>; }
+
+<span class="keyword">auto</span> <span class="variable-name">s</span> = <span
class="string">"enum Type {}"</span>;