From: teranisi Date: Fri, 9 Nov 2001 03:45:52 +0000 (+0000) Subject: * wl-util.el (wl-set-string-width) [Emacs]: New implementation. X-Git-Tag: wl-2_8-root~154 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3fb8d741bbbf873dbf9c896901910be3fac4da2;p=elisp%2Fwanderlust.git * wl-util.el (wl-set-string-width) [Emacs]: New implementation. * mmimap.el (mmimap-entity-section): Changed body node number from "0" to "1". --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 2f4fae1..5dcfa34 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2001-11-09 Yuuichi Teranishi + + * mmimap.el (mmimap-entity-section): Changed body node number from + "0" to "1". + 2001-11-08 Hiroya Murata * elmo-pop3.el (elmo-folder-delete-messages-plugged): Renamed from diff --git a/elmo/mmimap.el b/elmo/mmimap.el index 0eb752e..f0e33a2 100644 --- a/elmo/mmimap.el +++ b/elmo/mmimap.el @@ -62,7 +62,7 @@ SECTION is a section string which is defined in RFC2060.") "Return a section string from NODE-ID" (cond ((null node-id) - "0") + "1") ((numberp node-id) (number-to-string (1+ node-id))) ((listp node-id) diff --git a/wl/ChangeLog b/wl/ChangeLog index b4f199f..9603b1a 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,7 @@ +2001-11-09 Yuuichi Teranishi + + * wl-util.el (wl-set-string-width) [Emacs]: New implementation. + 2001-11-08 Yuuichi Teranishi * wl-util.el (wl-biff-check-folder-async-callback): Fixed unread diff --git a/wl/wl-util.el b/wl/wl-util.el index 780ea75..c05529c 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -174,23 +174,35 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, ;;(make-obsolete 'wl-set-hash-val 'elmo-set-hash-val) (defsubst wl-set-string-width (width string) - (elmo-set-work-buf - (elmo-set-buffer-multibyte default-enable-multibyte-characters) - (insert string) - (if (> (current-column) width) - (if (> (move-to-column width) width) - (progn - (condition-case nil ; ignore error - (backward-char 1) - (error)) - (concat (buffer-substring (point-min) (point)) " ")) - (buffer-substring (point-min) (point))) - (if (= (current-column) width) - string - (concat string - (format (format "%%%ds" - (- width (current-column))) - " ")))))) + (static-cond + ((and (fboundp 'string-width) (fboundp 'truncate-string-to-width) + (not (featurep 'xemacs))) + (if (> (string-width string) width) + (setq string (truncate-string-to-width string width))) + (if (= (string-width string) width) + string + (concat string + (format (format "%%%ds" + (- width (string-width string))) + " ")))) + (t + (elmo-set-work-buf + (elmo-set-buffer-multibyte default-enable-multibyte-characters) + (insert string) + (if (> (current-column) width) + (if (> (move-to-column width) width) + (progn + (condition-case nil ; ignore error + (backward-char 1) + (error)) + (concat (buffer-substring (point-min) (point)) " ")) + (buffer-substring (point-min) (point))) + (if (= (current-column) width) + string + (concat string + (format (format "%%%ds" + (- width (current-column))) + " ")))))))) (defun wl-display-bytes (num) (let (result remain)