diff options
author | Yuan Fu <casouri@gmail.com> | 2022-12-30 00:34:42 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-12-30 00:35:14 -0800 |
commit | fba35657da5697f3dd55cbbd3a60e36c7561f94b (patch) | |
tree | 817e450c23d39757deaa07fe21aa61f92f772f9f /lisp/progmodes/c-ts-mode.el | |
parent | dec1b37a32b5ea4102cc5dcd803ac73774f2574c (diff) | |
download | emacs-fba35657da5697f3dd55cbbd3a60e36c7561f94b.tar.gz emacs-fba35657da5697f3dd55cbbd3a60e36c7561f94b.tar.bz2 emacs-fba35657da5697f3dd55cbbd3a60e36c7561f94b.zip |
; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragraph): Fix.
Diffstat (limited to 'lisp/progmodes/c-ts-mode.el')
-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 |