Description
I'm not sure if this should be two issues or one, but they feel related.
When programming in C/C++ with cc-mode
, when the cursor is inside a comment and I hit M-<home>
(which is bound to beginning-of-line-text
), then the cursor moves to the first character of the comment text after the comments symbols, e.g.:
// Comment text
^ `beginning-of-line-text` moves the cursor here
In rust-mode
, the cursor moves to the first non-whitespace character (same as back-to-indentation
).
Possibly related: when I hit C-u M-q
(bound to (fill-paragraph 't)
) to justify a paragraph in a comment, rust-mode
adds extra spaces to the begnining of some lines:
/// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
/// in reprehenderit in voluptate velit esse cillum dolore eu
/// fugiat nulla pariatur.
whereas cc-mode
is able to justify the text correctly:
/// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
/// in reprehenderit in voluptate velit esse cillum dolore eu
/// fugiat nulla pariatur.
I believe both issues may be related to identifying and setting the fill-prefix
when these functions are called inside comments. It would be nice to have those working as in cc-mode
.
Activity