I need to write code comments with aligned borders on all four sides due to an externally enforced coding standard.
What's the easiest way, in Emacs, to:
- Convert some text into a block comment in this format
- Edit the text in a block comment and have Emacs reflow it correctly
Comment format examples:
#*****************************************************************************#
#* This is a block comment. It has right-aligned borders. *#
#* *#
#* It can have separate paragraphs. Text in a long paragraph flows from one *#
#* line to the next with one space of internal padding. *#
#* *#
#* The right hand border is at char 78 *#
#*****************************************************************************#
sub MySub
{
#***************************************************************************#
#* The left hand edge of the comment is aligned with the current code *#
#* block, but the right hand border is still at char 78 *#
#***************************************************************************#
my $var = 3;
}
auto-fill-mode
by itself doesn't preserve the right hand border.