Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of continuing unclosed multiline comments #6

Open
amnn opened this issue Oct 5, 2022 · 0 comments
Open

Fix handling of continuing unclosed multiline comments #6

amnn opened this issue Oct 5, 2022 · 0 comments
Labels
bug Something isn't working challenge Will take some extra thought or work help wanted Extra attention is needed

Comments

@amnn
Copy link
Owner

amnn commented Oct 5, 2022

Quoting from the README:

Filling a paragraph in an unterminated multi-line comment (starting with /* but with no matching */), or inserting a newline to continue the comment causes Emacs to use /* as the fill prefix rather than the intended *. This can be fixed by adding the closing */.

So if you have a buffer with this content, and the cursor at |:

/**
 * This is a multi-line comment which hasn't finished yet|

Running M-x comment-indent-and-newline currently (in Emacs 28.1) produces:

/**
 * This is a multi-line comment which hasn't finished yet
/**|

Instead of

/**
 * This is a multi-line comment which hasn't finished yet
 * |

This task is about fixing this behaviour without requiring that someone closes the comment proactively.

NOTE: This may not be possible, this bug is apparent in other major modes (tested with rust-mode, cc-mode).

@amnn amnn added bug Something isn't working help wanted Extra attention is needed challenge Will take some extra thought or work labels Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working challenge Will take some extra thought or work help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant