[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comment-padding type ?
From: |
Pierre Lorenzon |
Subject: |
Re: comment-padding type ? |
Date: |
Wed, 26 Aug 2009 17:19:01 +0200 (CEST) |
Hi !
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: comment-padding type ?
Date: Wed, 26 Aug 2009 11:06:46 -0400
>> But in function comment-padright we find this piece of code :
>
>> (let ((s (match-string 1 str)) ;actual string
>> (lpad (substring str 0 (match-beginning 1))) ;left padding
>> (rpad (concat (substring str (match-end 1)) ;original right padding
>> (substring comment-padding ;additional right padding
>> (min (- (match-end 0) (match-end 1))
>> (length comment-padding)))))
>
>> where comment-padding is actually supposed to be a sequence and
>> not an integer. Actually in one mode comment-padding was set to
>> 1 and I got an error when trying to execute
>> comment-padright. When setting the value to " " everything goes
>> well !
>
>> In my opinion the comment-padding documentation is
>> abusive. Either it should be changed or a conversion mechanism
>> should be added.
>
> There is a conversion mechanism. It's in comment-normalize-vars which
> you failed to call (and whose importance I obviously fail to make
> clear, in the doc).
OK ! it works now.
Thanks !
Pierre
>
>
> Stefan
>