summaryrefslogtreecommitdiff
path: root/lisp/progmodes/c-ts-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/c-ts-mode.el')
-rw-r--r--lisp/progmodes/c-ts-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 82458ba5adb..82a13e97625 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -595,7 +595,9 @@ ARG is passed to `fill-paragraph'."
(start-marker nil)
(end-marker nil)
(end-len 0))
- (when (equal (treesit-node-type node) "comment")
+ ;; These covers C/C++, Java, JavaScript, TypeScript, Rust, C#.
+ (when (member (treesit-node-type node)
+ '("comment" "line_comment" "block_comment"))
;; We mask "/*" and the space before "*/" like
;; `c-fill-paragraph' does.
(atomic-change-group