]> git.eshelyaron.com Git - emacs.git/commit
Remove treesit-comment-start/end and use comment-start/end-skip
authorYuan Fu <casouri@gmail.com>
Sun, 27 Nov 2022 22:15:57 +0000 (14:15 -0800)
committerYuan Fu <casouri@gmail.com>
Sun, 27 Nov 2022 22:20:56 +0000 (14:20 -0800)
commitd5dc1dbf7cb263d8ff541a0def028c2d7d24f82b
tree878994bb6bc5c1b6465fd0ba7df0352c5888d853
parent849223fba1ef899f90a6edff05bce24b90fbb043
Remove treesit-comment-start/end and use comment-start/end-skip

treesit-comment-start/end is unnecessary because of
comment-start/end-skip, so they should be removed.

Cleanup and set comment-start/end-skip for tree-sitter C-like major
modes.

I replaced the [ \t]* part in comment-start-skip with (syntax
whitespace), which is what comment-end-skip uses.  I also added
grouping in comment-start-skip to match that of comment-end-skip.

* 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 (typescript-ts-mode): Setup
comment-start/end-skip.

* lisp/treesit.el (treesit-comment-start)
(treesit-comment-end): Remove variables.
(treesit-simple-indent-presets): Use comment-start/end-skip instead.
lisp/progmodes/c-ts-mode.el
lisp/progmodes/csharp-mode.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/typescript-ts-mode.el
lisp/treesit.el