From: yoichi Date: Sun, 15 Jan 2006 13:12:17 +0000 (+0000) Subject: * wl-summary.el (wl-summary-get-list-info): Optimize. X-Git-Tag: wl-2_15_3~25 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=aedb114b8b1917d3e0d96cb19ed4a9d6f958ae1a;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-get-list-info): Optimize. Use List-Id and List-Post also. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index d37b599..2fdebbf 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2006-01-15 Yoichi NAKAYAMA + + * wl-summary.el (wl-summary-get-list-info): Optimize. + Use List-Id and List-Post also. + 2006-01-14 Hiroya Murata * wl-draft.el (wl-draft-send-confirm): Scroll up/down by SPC/BS. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index c674d39..0d4df45 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -974,7 +974,8 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." "Returns (\"ML-name\" . ML-count) of ENTITY." (or (elmo-message-entity-field entity 'ml-info) (let (sequence ml-name ml-count subject - return-path delivered-to mailing-list) + return-path delivered-to mailing-list + list-post list-id) (setq sequence (elmo-message-entity-field entity 'x-sequence) ml-name (or (elmo-message-entity-field entity 'x-ml-name) (and sequence @@ -996,16 +997,26 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (progn (or ml-name (setq ml-name (match-string 1 return-path))) (or ml-count (setq ml-count (match-string 2 return-path))))) - (and (setq delivered-to - (elmo-message-entity-field entity 'delivered-to)) - (string-match "^mailing list \\([^@]+\\)@" delivered-to) - (or ml-name (setq ml-name (match-string 1 delivered-to)))) - (and (setq mailing-list - (elmo-message-entity-field entity 'mailing-list)) - ;; *-help@, *-owner@, etc. - (string-match "\\(^\\|; \\)contact \\([^@]+\\)-[^-@]+@" - mailing-list) - (or ml-name (setq ml-name (match-string 2 mailing-list)))) + (or ml-name + (and (setq list-post (elmo-message-entity-field entity 'list-post)) + (string-match "" list-post) + (setq ml-name (match-string 1 list-post)))) + (or ml-name + (and (setq list-id (elmo-message-entity-field entity 'list-id)) + (string-match "<\\([^.]+\\).*>" list-id) + (setq ml-name (match-string 1 list-id)))) + (or ml-name + (and (setq delivered-to + (elmo-message-entity-field entity 'delivered-to)) + (string-match "^mailing list \\([^@]+\\)@" delivered-to) + (setq ml-name (match-string 1 delivered-to)))) + (or ml-name + (and (setq mailing-list + (elmo-message-entity-field entity 'mailing-list)) + ;; *-help@, *-owner@, etc. + (string-match "\\(^\\|; \\)contact \\([^@]+\\)-[^-@]+@" + mailing-list) + (setq ml-name (match-string 2 mailing-list)))) (cons (and ml-name (car (split-string ml-name " "))) (and ml-count (string-to-int ml-count))))))