Say you write some code like this (using ruby-mode, but I've seen this happen in other modes too):
# This is a comment.
def foo
puts "foo!"
end
If you put the point on the first line and hit M-q, you get this:
# This is a comment. def foo puts "foo!" end
How do I avoid that? I'm using version 21.3.
Clarification: This does not happen when I add a blank line between the comment and the code. As a work-around when I want to refill my comments, I go through an annoying three step process:
- I add a blank line before and after the comment paragraph
- M-q
- delete the blank lines
It'd be much nicer if M-q handled refilling comment paragraphs without having to add and delete blank lines. Emacs already know what text is comment text, so there must be a way to do this.