[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
comment-padding type ?
From: |
Pierre Lorenzon |
Subject: |
comment-padding type ? |
Date: |
Wed, 26 Aug 2009 09:05:46 +0200 (CEST) |
Hi All,
comment-padding documentation is as follows :
Padding string that `comment-region' puts between comment chars and text.
Can also be an integer which will be automatically turned into a string
of the corresponding number of spaces.
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.
Regards
Pierre