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

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

[nongnu] elpa/scala-mode a4ed6b4 073/217: Merge pull request #28 from no


From: ELPA Syncer
Subject: [nongnu] elpa/scala-mode a4ed6b4 073/217: Merge pull request #28 from non/bug/fix-colon-operators
Date: Sun, 29 Aug 2021 11:30:46 -0400 (EDT)

branch: elpa/scala-mode
commit a4ed6b42734cff24c1622d6c2be6607660c76908
Merge: 3142f5c e79e627
Author: Heikki Vesalainen <heikki.vesalainen@iki.fi>
Commit: Heikki Vesalainen <heikki.vesalainen@iki.fi>

    Merge pull request #28 from non/bug/fix-colon-operators
    
    Fix highlighting for operators beginning with colon.
---
 scala-mode-fontlock.el | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/scala-mode-fontlock.el b/scala-mode-fontlock.el
index 327841e..6a96fe3 100644
--- a/scala-mode-fontlock.el
+++ b/scala-mode-fontlock.el
@@ -402,16 +402,22 @@ Does not continue past limit.
                                         (2 font-lock-constant-face nil t)
                                         (3 font-lock-type-face nil t)))
 
-    ;; type ascriptions (: followed by a type)
+    ;; type ascription (: followed by alpha type name)
     (,(rx
        (or (not (in "!#%&*+-/:<=>?@\\^|~")) line-start)
        (group ":")
        (0+ space)
-       (group (or
-               (and (in "a-zA-Z_")
-                    (0+ (in "a-zA-Z0-9_"))
-                    (\? (and "_" (1+ (in "!#%&*+-/:<=>?@\\^|~")))))
-               (and (in "!#%&*+-/<=>?@\\^|~") (0+ (in 
"!#%&*+-/:<=>?@\\^|~"))))))
+       (group (in "a-zA-Z_")
+              (0+ (in "a-zA-Z0-9_"))
+              (\? (and "_" (1+ (in "!#%&*+-/:<=>?@\\^|~"))))))
+     (1 font-lock-keyword-face) (2 font-lock-type-face))
+
+    ;; type ascription (: followed by punctuation type name)
+    (,(rx
+       (or (not (in "!#%&*+-/:<=>?@\\^|~")) line-start)
+       (group ":")
+       (1+ space)
+       (group (1+ (in "-!#%&*+/:<=>?@\\^|~"))))
      (1 font-lock-keyword-face) (2 font-lock-type-face))
 
     ;; extends followed by type



reply via email to

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