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

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

[nongnu] elpa/scala-mode 11a710d 044/217: Correct annotation highlightin


From: ELPA Syncer
Subject: [nongnu] elpa/scala-mode 11a710d 044/217: Correct annotation highlighting.
Date: Sun, 29 Aug 2021 11:30:40 -0400 (EDT)

branch: elpa/scala-mode
commit 11a710d800c102a23ddb8993d750c50b0918704a
Author: Erik Osheim <d_m@plastic-idolatry.com>
Commit: Erik Osheim <d_m@plastic-idolatry.com>

    Correct annotation highlighting.
    
    Previously annotations weren't working, because of an earlier rule.
    This patch fixes that.
    
    It also supports dots in annotations, like @annotation.tailrec
---
 scala-mode-fontlock.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scala-mode-fontlock.el b/scala-mode-fontlock.el
index df62187..219b79b 100644
--- a/scala-mode-fontlock.el
+++ b/scala-mode-fontlock.el
@@ -327,6 +327,10 @@ Does not continue past limit.
     ;; User defined constants
     (,(scala-font-lock:create-user-constant-re) 0 font-lock-constant-face)
 
+    ;; Annotations
+    (, (rx (and "@" (in "a-zA-Z_.") (0+ (in "a-zA-Z0-9_."))))
+     . font-lock-preprocessor-face)
+
     ;; reserved symbols
     (scala-font-lock:mark-reserved-symbols 2 font-lock-keyword-face)
 
@@ -388,8 +392,6 @@ Does not continue past limit.
                                         (3 font-lock-type-face nil t)))
 
     ;; Some patterns from Erik
-    (,(rx "@" (in "a-zA-Z_") (0+ (in "a-zA-Z0-9_")))
-     . font-lock-preprocessor-face)
 
     ;; :
     (,(rx ":"



reply via email to

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