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

fill while in a comment should behave as in text modes #62

Merged
merged 1 commit into from Apr 9, 2018
Merged

fill while in a comment should behave as in text modes #62

merged 1 commit into from Apr 9, 2018

Conversation

ts4z
Copy link
Contributor

@ts4z ts4z commented Apr 4, 2018

This fixes a bug in fill-paragraph that made adaptive fill not work
while in a comment (probably the only time it matters in yaml-mode).

This change does what lisp-mode does: first, try fill-comment-paragraph.
If fill-comment-paragraph does the fill, great; we're in a comment, and
the right thing happens. If it returns nil, it can't do the fill, and
we can fall back to the previous method.

Without this change, a paragraph break inside a comment, or other things
that adaptive fill would generally detect, are not respected.

This fixes a bug in fill-paragraph that made adaptive fill not work
while in a comment (probably the only time it matters in yaml-mode).

This change does what lisp-mode does: first, try fill-comment-paragraph.
If fill-comment-paragraph does the fill, great; we're in a comment, and
the right thing happens.  If it returns nil, it can't do the fill, and
we can fall back to the previous method.

Without this change, a paragraph break inside a comment, or other things
that adaptive fill would generally detect, are not respected.
@wasamasa
Copy link
Collaborator

wasamasa commented Apr 8, 2018

Looks good.

One more thing though, there's been interest into getting this mode into GNU ELPA. Are you willing to submit copyright assignment to the FSF, assuming you haven't already? I'd hate to accept contributions that would make reaching this goal harder :|

@ts4z
Copy link
Contributor Author

ts4z commented Apr 8, 2018

I don't want to claim any copyright on this. I ripped it off from lisp-mode anyway, because that worked the way I expected. But I would sign if needed.

@wasamasa
Copy link
Collaborator

wasamasa commented Apr 8, 2018

It would be nice if you could just universally forfeit copyright, but that's not a thing yet. This is why the FSF requires signing a copyright assignment form for every non-trivial contributor (meaning more than five lines of diff).

@ts4z
Copy link
Contributor Author

ts4z commented Apr 8, 2018

Ok. I can either sign what needs signing or make it a smaller diff.

@wasamasa wasamasa merged commit 40067a1 into yoshiki:master Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants