; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragraph): Fix.

This commit is contained in:
Yuan Fu 2022-12-30 00:34:42 -08:00
parent dec1b37a32
commit fba35657da
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -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