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

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

[nongnu] elpa/kotlin-mode c91a82b864 031/162: kotlin-mode: Highlight try


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode c91a82b864 031/162: kotlin-mode: Highlight try-`catch-finally'
Date: Sat, 29 Jan 2022 08:25:19 -0500 (EST)

branch: elpa/kotlin-mode
commit c91a82b86471d663497d4cc76553581e3facd0de
Author: Shodai Yokoyama <quantumcars@gmail.com>
Commit: Shodai Yokoyama <quantumcars@gmail.com>

    kotlin-mode: Highlight try-`catch-finally'
---
 kotlin-mode.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index 72582fe610..5c447063bf 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -143,6 +143,19 @@
              eow)
        t)
      1 font-lock-keyword-face)
+
+    ;; try-catch-finally
+    ;; `catch' and `finally' are valid identifier being used as variable
+    (,(rx-to-string
+       `(and bow (group "catch") eow
+             (* space) (*? anything) "{" )
+       t)
+     1 font-lock-keyword-face)
+    (,(rx-to-string
+       `(and bow (group "finally") eow
+             (*? (or space ?\n)) "{")
+       t)
+     1 font-lock-keyword-face)
     )
   "Default highlighting expression for `kotlin-mode'"
   )



reply via email to

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