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

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

[nongnu] elpa/kotlin-mode 472ae23d6a 113/162: Fix syntax highlighting of


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode 472ae23d6a 113/162: Fix syntax highlighting of star-projected types
Date: Sat, 29 Jan 2022 08:25:28 -0500 (EST)

branch: elpa/kotlin-mode
commit 472ae23d6ad0fd17c6fc362efc20ece3d0264969
Author: Colin Fuller <cjfuller@gmail.com>
Commit: Colin Fuller <cjfuller@gmail.com>

    Fix syntax highlighting of star-projected types
    
    Previously, when encountering a star-projected type (like `List<*>`),
    kotlin-mode would highlight it only to the opening `<`. This commit adds 
`*` to
    the characters that can appear in a type so that it correctly highlights
    through the closing `>`.
    
    Tested by creating a file `test.kt` with the following contents:
    ```
    val x: List<*> = f()
    ```
    Prior to this commit, this would only highlight through the opening `<`, 
now it
    highlights through the closing `>`.
---
 kotlin-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index dda9cdc2ac..143cc880e4 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -214,7 +214,7 @@
 
     ;; Types
     (,(rx-to-string
-      `(and bow upper (group (* (or word "<" ">" "." "?" "!"))))
+      `(and bow upper (group (* (or word "<" ">" "." "?" "!" "*"))))
       t)
      0 font-lock-type-face)
 



reply via email to

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