* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Delete trailing
whitespace before inserting newline. The insert-line-break
function is the same as in c-indent-new-comment-line.
(cherry picked from commit
e6a8492fabc1e7065983fbf6506a2790c137cd9f)
(looking-at "//"))
;; In rust, NODE will be the body of a comment, and the
;; parent will be the whole comment.
- (if-let ((start (treesit-node-start
- (treesit-node-parent node))))
+ (if-let* ((start (treesit-node-start
+ (treesit-node-parent node))))
(save-excursion
(goto-char start)
(looking-at "//"))))
(delete-horizontal-space)
(if soft
(insert-and-inherit ?\n)
- (newline (if allow-auto-fill nil 1))))))
+ (newline 1)))))
(cond
;; Line starts with //, or ///, or ////...
;; Or //! (used in rust).