[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode e79e627 072/217: Fix highlighting for operators
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode e79e627 072/217: Fix highlighting for operators beginning with colon. |
Date: |
Sun, 29 Aug 2021 11:30:46 -0400 (EDT) |
branch: elpa/scala-mode
commit e79e62794c0c2901f44ada7a74105fbeb14c02f1
Author: Erik Osheim <d_m@plastic-idolatry.com>
Commit: Erik Osheim <d_m@plastic-idolatry.com>
Fix highlighting for operators beginning with colon.
This fixes an issue with operators named things like :=, :#:, etc.
It's most noticable when editing sbt files, since := was being
highlighted as a type ascription instead of a method.
---
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
- [nongnu] elpa/scala-mode 3989897 174/217: bump version (#111), (continued)
- [nongnu] elpa/scala-mode 3989897 174/217: bump version (#111), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 360b5ba 162/217: Merge pull request #92 from fommil/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 387e93c 178/217: revert 618f0fbef4d3d94156f834a66e36c79f07a54e02, fixes #118 (#119), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c71efcc 188/217: quoteids are now propertized as symbols (#137), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1d08e88 201/217: Merge pull request #154 from pgronkievitz/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 265dadc 214/217: fix: `//`-comments filled incorrectly (`//` not acting as prefix), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b85fa5e 213/217: Merge pull request #167 from Kazark/trailing-comma, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6966328 216/217: Merge pull request #168 from Kazark/slash-slash, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e23875e 054/217: Fixed number literals not highlighting after foo_123, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3142f5c 071/217: Fixed #26, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e79e627 072/217: Fix highlighting for operators beginning with colon.,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 17c6306 070/217: Highlight "var"s differently., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f76902a 105/217: Merge pull request #53 from jjl/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 9cfc522 110/217: fix to scala-indent:fix-line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode cc5b9b0 116/217: typo fix: ident vs. indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0c39da9 114/217: upgraded version to 0.22 since we added new functionality required by sbt-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode df36b5c 117/217: fix README.md text, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c21f88f 124/217: Merge pull request #61 from nicferrier/marmalade, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f431bb3 123/217: remove the attempt at checking executables, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 13ad3ac 132/217: Added Jim Powers to list of contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d27a39b 130/217: added Tillmann Rendel to the list of commiters, ELPA Syncer, 2021/08/29