From fba35657da5697f3dd55cbbd3a60e36c7561f94b Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Fri, 30 Dec 2022 00:34:42 -0800 Subject: [PATCH] ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragraph): Fix. --- lisp/progmodes/c-ts-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5