Make c-ts-common--fill-paragraph work for rust line comment
* lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Back to BOL before checking for //.
This commit is contained in:
parent
145a77808e
commit
67ef1d54e7
1 changed files with 3 additions and 0 deletions
|
@ -125,6 +125,9 @@ ARG is passed to `fill-paragraph'."
|
|||
(treesit-node-type node))
|
||||
(if (save-excursion
|
||||
(goto-char (treesit-node-start node))
|
||||
;; In rust, NODE will be the body of a comment excluding
|
||||
;; the //, so we need to go to BOL to check for //.
|
||||
(back-to-indentation)
|
||||
(looking-at "//"))
|
||||
(fill-comment-paragraph arg)
|
||||
(c-ts-common--fill-block-comment arg)))
|
||||
|
|
Loading…
Add table
Reference in a new issue