Is there an existing function, and if not how would I write one, that turns this:
/* asdasdasd asdasdasd asdasdasd */ /* asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd */ /* asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd */ /* asdasdasd asdasdasd */ /* asdasdasd asdasdasd asdasdasd asdasdasd */ into this?
/* asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd */ /* asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd asdasdasd */ /* asdasdasd asdasdasd asdasdasd asdasdasd */ That function should also work for other languages with multi-line comments, like tuareg-mode with (* … *). I'd like to achieve the same behavior as M-q for line comments (which properly wraps and adjusts comment markers like //.
forward-comment(both forwards and backwards) to establish the bounds of the commented region, thenuncomment-region,fill-region,comment-regionto reformat it./*and*/don't make the text too long). I wonder if this could be achieved with a combination of fill-prefix and comment-start and…