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

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

[nongnu] elpa/kotlin-mode c6207be613 038/162: kotlin-mode: Add kotin-mod


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode c6207be613 038/162: kotlin-mode: Add kotin-mode--syntax-propertize-function
Date: Sat, 29 Jan 2022 08:25:20 -0500 (EST)

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

    kotlin-mode: Add kotin-mode--syntax-propertize-function
---
 kotlin-mode.el | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index 86760cc163..6b9c2e982a 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -199,6 +199,20 @@
                          (match-data))))
   )
 
+(defun kotlin-mode--syntax-propertize-function (start end)
+  (let ((case-fold-search))
+    (goto-char start)
+    (remove-text-properties start end '(kotlin-property--interpolation))
+    (funcall
+     (syntax-propertize-rules
+      ((let ((identifier '(any alnum " !%&()*+-./:<>?[]^_|~")))
+         (rx-to-string
+          `(or (group "${" (* ,identifier) "}")
+               (group "$" (+ ,identifier)))))
+       (0 (ignore (kotlin-mode--syntax-propertize-interpolation)))))
+     start end))
+  )
+
 (define-derived-mode kotlin-mode prog-mode "Kotlin"
   "Major mode for editing Kotlin."
 



reply via email to

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