emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 fba35657da 2/2: ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fil


From: Yuan Fu
Subject: emacs-29 fba35657da 2/2: ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragraph): Fix.
Date: Fri, 30 Dec 2022 03:37:34 -0500 (EST)

branch: emacs-29
commit fba35657da5697f3dd55cbbd3a60e36c7561f94b
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    ; * 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 82458ba5ad..82a13e9762 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]