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

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

[nongnu] elpa/kotlin-mode 5d2d7b4f5a 157/162: Make underscore and at sig


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode 5d2d7b4f5a 157/162: Make underscore and at sign as a part of a symbol
Date: Sat, 29 Jan 2022 08:25:32 -0500 (EST)

branch: elpa/kotlin-mode
commit 5d2d7b4f5afb5a1abc365ffebfbff2912bee05d9
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Make underscore and at sign as a part of a symbol
    
    - C-M-f (`forward-sexp') and C-M-b (`backward-sexp') skip those
      characters.
    
    - M-f (`forward-word') and M-b (`backward-word') stop at those
      characters, like `java-mode'.
      Use `superword-mode' to restore original behaviour.
      Fixes 
https://github.com/Emacs-Kotlin-Mode-Maintainers/kotlin-mode/issues/59.
---
 kotlin-mode.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index bc331cefc4..1c0334f2b7 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -143,8 +143,9 @@
     (modify-syntax-entry ?\' "\"" st)
     (modify-syntax-entry ?` "\"" st)
 
-    ;; `_' as being a valid part of a word
-    (modify-syntax-entry ?_ "w" st)
+    ;; `_' and `@' as being a valid part of a symbol
+    (modify-syntax-entry ?_ "_" st)
+    (modify-syntax-entry ?@ "_" st)
 
     ;; b-style comment
     (modify-syntax-entry ?/ ". 124b" st)
@@ -259,7 +260,7 @@
     (,(rx-to-string
        `(and bow (or ,@kotlin-mode--val-decl-keywords) eow
              (+ space)
-             (group (+ word)) (* space)  (\? ":"))
+             (group (+ (or word (syntax symbol)))) (* space)  (\? ":"))
        t)
      1 font-lock-variable-name-face t)
 



reply via email to

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