GNU bug report logs - #6822
comment-padding skips first char in html-mode

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sun, 8 Aug 2010 17:10:03 UTC

Severity: normal

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 6822 <at> debbugs.gnu.org, Lennart Borgman <lennart.borgman <at> gmail.com>
Subject: bug#6822: comment-padding skips first char in html-mode
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




This bug report was last modified 3 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.