From 97f724dc0c2bbb8504f36001c9179f50a4113a1e Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 14 May 2002 05:49:02 +0000 Subject: [PATCH] * wl-vars.el (wl-invalid-character-message): New user option. * wl-util.el (wl-set-string-width): If truncated string-width is larger than specified width, use `wl-invalid-character-message'. --- wl/ChangeLog | 7 +++++++ wl/wl-util.el | 16 ++++++++++------ wl/wl-vars.el | 5 +++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index ac6e7c9..a6b29f0 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-05-14 Yuuichi Teranishi + + * wl-vars.el (wl-invalid-character-message): New user option. + + * wl-util.el (wl-set-string-width): If truncated string-width is + larger than specified width, use `wl-invalid-character-message'. + 2002-05-14 KAMO Tomoyuki * wl-summary.el (wl-summary-prefetch-msg): diff --git a/wl/wl-util.el b/wl/wl-util.el index d9ce4c7..d1f69b3 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -186,12 +186,16 @@ 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 - (max 0 (- (abs width) (string-width string))) - (or padding ?\ )))) - (if (< width 0) - (concat paddings string) - (concat string paddings))))) + (if (< (abs width) (string-width string)) + (wl-set-string-width width + wl-invalid-character-message + padding) + (let ((paddings (make-string + (max 0 (- (abs width) (string-width string))) + (or padding ?\ )))) + (if (< width 0) + (concat paddings string) + (concat string paddings)))))) (t (elmo-set-work-buf (elmo-set-buffer-multibyte default-enable-multibyte-characters) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index c8d5186..823c595 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -2425,6 +2425,11 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format." (const :tag "bitmap (using BITMAP-MULE)" bitmap)) :group 'wl-pref) +(defcustom wl-invalid-character-message "(WL:Invalid characters.)" + "*A string displayed when invalid character exists." + :type 'string + :group 'wl-pref) + ;;; Internal variables (defvar wl-init nil) -- 1.7.10.4