diff options
author | Yuan Fu <casouri@gmail.com> | 2022-12-02 17:03:21 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-12-03 14:49:38 -0800 |
commit | 96af584af6c8ea50f9cf871db9ffca91040fb85d (patch) | |
tree | 71e85c4b991520c32ab3aa2d66ead1d0ebd913d8 /lisp/progmodes/java-ts-mode.el | |
parent | 520a4e12f8e6e42d0c66cc6b3cf3be05c411fe6f (diff) | |
download | emacs-96af584af6c8ea50f9cf871db9ffca91040fb85d.tar.gz emacs-96af584af6c8ea50f9cf871db9ffca91040fb85d.tar.bz2 emacs-96af584af6c8ea50f9cf871db9ffca91040fb85d.zip |
Fix comment-start-skip in tree-sitter modes (bug#59690)
* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode): Remove the group
from the regexp.
Diffstat (limited to 'lisp/progmodes/java-ts-mode.el')
-rw-r--r-- | lisp/progmodes/java-ts-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index cf2482bb6ee..2c42505ac94 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -301,7 +301,8 @@ the subtrees." ;; Comments. (setq-local comment-start "// ") (setq-local comment-end "") - (setq-local comment-start-skip (rx (group "/" (or (+ "/") (+ "*"))) + (setq-local comment-start-skip (rx (or (seq "/" (+ "/")) + (seq "/" (+ "*"))) (* (syntax whitespace)))) (setq-local comment-end-skip (rx (* (syntax whitespace)) |