From eeebc857c6ec782f1505c744f1ef96168a735432 Mon Sep 17 00:00:00 2001 From: teranisi Date: Sat, 11 May 2002 10:27:17 +0000 Subject: [PATCH] (wl-set-string-width): Avoid using negative number for make-string. --- wl/ChangeLog | 5 +++++ wl/wl-util.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index ab6dae6..c08e6c3 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Yuuichi Teranishi + + * wl-util.el (wl-set-string-width): Avoid using negative number + for make-string. + 2002-05-10 Hiroya Murata * wl-summary.el (wl-summary-line-list-info): Revised format of the diff --git a/wl/wl-util.el b/wl/wl-util.el index 770ba7c..d9ce4c7 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -186,8 +186,9 @@ to add the result instead of white space." (setq string (truncate-string-to-width string (abs width)))) (if (= (string-width string) (abs width)) string - (let ((paddings (make-string (- (abs width) (string-width string)) - (or padding ?\ )))) + (let ((paddings (make-string + (max 0 (- (abs width) (string-width string))) + (or padding ?\ )))) (if (< width 0) (concat paddings string) (concat string paddings))))) -- 1.7.10.4