Subject: Re: bug#6822: comment-padding skips first char in html-mode

From: Stefan Monnier <[email-masked]>
Date: Mon, 09 Aug 2010 10:35:06 +0200

>> (setq comment-padding "xy")
>> gives
>> <!-- yy --> - html-mode

> This is because of this behavior in comment-padright and
> comment-padleft:

>   If STR already contains padding, the corresponding amount is
>   ignored from `comment-padding'.

> I'm not sure what the reason is.  Stefan?

IIRC the issue is that comment-padding interacts with comment-start and
comment-end in otherwise unexpected ways.  E.g. often "comment-start"
includes a trailing space, since this string is used as-is when you
insert a comment via comment-indent.  But if you set comment-padding to
2, you usually don't want the resulting spacing to be 3 spaces when
you do comment-region.

        Stefan