From: hmurata Date: Sat, 18 May 2002 15:43:37 +0000 (+0000) Subject: * wl-summary.el (wl-summary-line-list-info): Rewrite. X-Git-Tag: elmo-mark-root~113 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=235e4c79058feeb97cd03bce1193168fbe8f1807;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-line-list-info): Rewrite. (wl-summary-line-list-count): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index bf76075..76ac4a8 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2002-05-18 Hiroya Murata + + * wl-summary.el (wl-summary-line-list-info): Rewrite. + (wl-summary-line-list-count): Ditto. + 2002-05-18 Kenichi OKADA * wl-vars.el (wl-nntp-posting-config-alist): New variable. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 96e6f38..1d5431e 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4128,8 +4128,7 @@ If ARG, exit virtual folder." wl-message-entity)))) (defun wl-summary-line-list-info () - (let ((folder wl-summary-buffer-folder-name) - (sequence) (ml-name) (ml-count) (subject-string)) + (let (sequence ml-name ml-count subject return-path) (setq sequence (elmo-msgdb-overview-entity-get-extra-field wl-message-entity "x-sequence") ml-name (or (elmo-msgdb-overview-entity-get-extra-field @@ -4141,18 +4140,21 @@ If ARG, exit virtual folder." (elmo-msgdb-overview-entity-get-extra-field wl-message-entity "x-ml-count") (and sequence - (cadr (split-string sequence " ")))) - subject-string - (elmo-delete-char ?\n - (or (elmo-msgdb-overview-entity-get-subject - wl-message-entity) - wl-summary-no-subject-message))) - (if (string-match - "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" - subject-string) - (progn - (if (not ml-name) (setq ml-name (match-string 1 subject-string))) - (if (not ml-count) (setq ml-count (match-string 2 subject-string))))) + (cadr (split-string sequence " "))))) + (and (setq subject (elmo-msgdb-overview-entity-get-subject + wl-message-entity)) + (setq subject (elmo-delete-char ?\n subject)) + (string-match "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" subject) + (progn + (or ml-name (setq ml-name (match-string 1 subject))) + (or ml-count (setq ml-count (match-string 2 subject))))) + (and (setq return-path + (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "return-path")) + (string-match "^<\\([^@>]+\\)-return-\\([0-9]+\\)-" return-path) + (progn + (or ml-name (setq ml-name (match-string 1 return-path))) + (or ml-count (setq ml-count (match-string 2 return-path))))) (condition-case nil (if (and ml-name ml-count) (format "(%s %05d)" @@ -4162,28 +4164,32 @@ If ARG, exit virtual folder." (error "")))) (defun wl-summary-line-list-count () - (let ((folder wl-summary-buffer-folder-name) - (sequence) (ml-count) (subject-string)) - (setq sequence (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-sequence") - ml-count (or (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-mail-count") - (elmo-msgdb-overview-entity-get-extra-field - wl-message-entity "x-ml-count") - (and sequence - (cadr (split-string sequence " "))))) + (let (sequence ml-count subject-string return-path) + (setq ml-count + (or (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-mail-count") + (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-ml-count") + (and (setq sequence (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "x-sequence")) + (cadr (split-string sequence " "))) + (and (setq subject-string + (elmo-msgdb-overview-entity-get-subject + wl-message-entity)) + (setq subject-string + (elmo-delete-char ?\n subject-string)) + (string-match "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" + subject-string) + (match-string 2 subject-string)) + (and (setq return-path + (elmo-msgdb-overview-entity-get-extra-field + wl-message-entity "return-path")) + (string-match "^<[^@>]+-return-\\([0-9]+\\)-" + return-path) + (match-string 1 return-path)))) (if ml-count (format "%d" (string-to-int ml-count)) - (setq subject-string - (elmo-delete-char ?\n - (or (elmo-msgdb-overview-entity-get-subject - wl-message-entity) - ""))) - (if (string-match - "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*" - subject-string) - (match-string 2 subject-string) - "")))) + ""))) (defun wl-summary-line-attached () (let ((content-type (elmo-msgdb-overview-entity-get-extra-field