From: okada Date: Fri, 27 Aug 2010 10:14:22 +0000 (+0000) Subject: * wl-summary.el (wl-summary-prefetch-msg): Make the confirmation X-Git-Tag: merged-trunk-to-elmo-imap4-compliance-1^2~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47d1e71430bf6fc9beb6fdb34238e91d5032aa89;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-prefetch-msg): Make the confirmation message human-readable. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index a9460c8..3b66758 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2010-08-27 Kenichi Okada + + * wl-summary.el (wl-summary-prefetch-msg): Make the confirmation + message human-readable. + 2010-08-26 TAKAHASHI Kaoru * wl-e21.el (wl-draft-insert-signature): Fix comment style. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index cb4b661..d9a685c 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1596,7 +1596,7 @@ If ARG is non-nil, checking is omitted." (widen) (y-or-n-p (format - "Message from %s has %d bytes. Prefetch it? " + "Message from %s has %s bytes. Prefetch it? " (concat "[ " (save-match-data @@ -1612,7 +1612,10 @@ If ARG is non-nil, checking is omitted." 'from) "??"))))) " ]") - size)))) + (do ((size (/ size 1024.0) (/ size 1024.0)) + ;; kilo, mega, giga, tera, peta, exa + (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes))) + ((< size 1024) (format "%.0f%s" size (car post-fixes)))))))) (message ""))) ; flush. (if force-read (save-excursion