[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6822: comment-padding skips first char in html-mode
From: |
Stefan Monnier |
Subject: |
bug#6822: comment-padding skips first char in html-mode |
Date: |
Mon, 09 Aug 2010 10:35:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> (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