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

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

[nongnu] elpa/kotlin-mode a174f5ba44 039/162: kotlin-mode: Add kotlin-mo


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode a174f5ba44 039/162: kotlin-mode: Add kotlin-mode--match-interpolation
Date: Sat, 29 Jan 2022 08:25:20 -0500 (EST)

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

    kotlin-mode: Add kotlin-mode--match-interpolation
---
 kotlin-mode.el | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index 6b9c2e982a..adab2d0ff4 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -213,6 +213,21 @@
      start end))
   )
 
+(defun kotlin-mode--match-interpolation (limit)
+  (let ((pos (next-single-char-property-change (point)
+                                               'kotlin-property--interpolation
+                                               nil
+                                               limit)))
+    (when (and pos (> pos (point)))
+      (goto-char pos)
+      (let ((value (get-text-property pos 'kotlin-property--interpolation)))
+        (if value
+            (progn (set-match-data value)
+                   t)
+          (kotlin-mode--match-interpolation limit)))))
+  )
+
+
 (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]