diff options
-rw-r--r-- | lisp/progmodes/c-ts-mode.el | 4 |
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 |