projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
145a778
)
Make c-ts-common--fill-paragraph work for rust line comment
author
Yuan Fu
<casouri@gmail.com>
Tue, 23 Apr 2024 23:28:20 +0000
(16:28 -0700)
committer
Yuan Fu
<casouri@gmail.com>
Wed, 24 Apr 2024 05:55:36 +0000
(22:55 -0700)
* lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Back to
BOL before checking for //.
lisp/progmodes/c-ts-common.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/c-ts-common.el
b/lisp/progmodes/c-ts-common.el
index 457aa55c195216bb4c55be899996255ff07e8cbe..c06295b8a87ea5a4736223a9a791bdb38bdd05f3 100644
(file)
--- a/
lisp/progmodes/c-ts-common.el
+++ b/
lisp/progmodes/c-ts-common.el
@@
-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)))