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

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

[nongnu] elpa/kotlin-mode eb3704e0e2 106/162: Set adaptive-fill-regexp t


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode eb3704e0e2 106/162: Set adaptive-fill-regexp to comment-start-skip
Date: Sat, 29 Jan 2022 08:25:27 -0500 (EST)

branch: elpa/kotlin-mode
commit eb3704e0e2456b215983f28b34967e442881f906
Author: James Nguyen <james@jojojames.com>
Commit: James Nguyen <james@jojojames.com>

    Set adaptive-fill-regexp to comment-start-skip
    
    Without this, calling (beginning-of-line-text) on a comment like
    
    // This is a comment.
    
    will bring the cursor to:
    
    [/]/ This is a comment.
    
    Whereas the expected result of calling (beginning-of-line-text) would be
    
    // [T]his is a comment.
---
 kotlin-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index 8b6e68e872..e30a360a08 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -405,6 +405,7 @@
   (set (make-local-variable 'comment-start-skip) "\\(//+\\|/\\*+\\)\\s *")
   (set (make-local-variable 'comment-end) "")
   (set (make-local-variable 'indent-line-function) 'kotlin-mode--indent-line)
+  (setq-local adaptive-fill-regexp comment-start-skip)
 
   :group 'kotlin
   :syntax-table kotlin-mode-syntax-table)



reply via email to

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