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

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

[nongnu] elpa/d-mode 84bf8ab 262/346: Fix fontification of single-charac


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 84bf8ab 262/346: Fix fontification of single-character package names
Date: Sun, 29 Aug 2021 11:00:42 -0400 (EDT)

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

    Fix fontification of single-character package names
    
    Ignore result of c-end-of-current-token, as we are not in a token
    after advancing by one character for a one-character token.
---
 d-mode.el          | 10 +++++-----
 tests/I0054.d      |  2 ++
 tests/I0054.d.html |  2 ++
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index 1611542..0c757d7 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:  201909121403
+;; Version:  201909121408
 ;; Keywords:  D programming language emacs cc-mode
 ;; Package-Requires: ((emacs "25.1"))
 
@@ -1614,10 +1614,10 @@ Key bindings:
            ;; identifier
            (setq c-last-identifier-range nil)
            (forward-char)
-           (when (c-end-of-current-token)
-             (when c-record-type-identifiers
-               (c-record-ref-id (cons safe-pos (point))))
-             t))
+           (c-end-of-current-token)
+           (when c-record-type-identifiers
+             (c-record-ref-id (cons safe-pos (point))))
+           t)
           ;; . or , or = (keep fontifying)
           ((memq (char-after) '(?. ?, ?=))
            (forward-char)
diff --git a/tests/I0054.d b/tests/I0054.d
index acca87a..1127930 100644
--- a/tests/I0054.d
+++ b/tests/I0054.d
@@ -16,3 +16,5 @@ import aaa.bbb.Ccc;
 import ddd = aaa.bbb.ccc, vvv = xxx.yyy.zzz;
 import aaa.bbb.ccc : x, y, z;
 import aaa.bbb.ccc : i = x, j = y, k = z;
+
+import a.b.c : d;
diff --git a/tests/I0054.d.html b/tests/I0054.d.html
index 22dd3e2..933e5de 100644
--- a/tests/I0054.d.html
+++ b/tests/I0054.d.html
@@ -16,3 +16,5 @@
 <span class="keyword">import</span> <span class="constant">ddd</span> = <span 
class="constant">aaa</span>.<span class="constant">bbb</span>.<span 
class="constant">ccc</span>, <span class="constant">vvv</span> = <span 
class="constant">xxx</span>.<span class="constant">yyy</span>.<span 
class="constant">zzz</span>;
 <span class="keyword">import</span> <span class="constant">aaa</span>.<span 
class="constant">bbb</span>.<span class="constant">ccc</span> : x, y, z;
 <span class="keyword">import</span> <span class="constant">aaa</span>.<span 
class="constant">bbb</span>.<span class="constant">ccc</span> : i = x, j = y, k 
= z;
+
+<span class="keyword">import</span> <span class="constant">a</span>.<span 
class="constant">b</span>.<span class="constant">c</span> : d;



reply via email to

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