From: kaoru Date: Wed, 8 Nov 2000 11:31:23 +0000 (+0000) Subject: * wl-folder.el (wl-folder-guess-mailing-list-by-folder-name): New X-Git-Tag: wl-2_4_0pre2~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7cda258222739c6726dcbc2c9ad21880493a6119;p=elisp%2Fwanderlust.git * wl-folder.el (wl-folder-guess-mailing-list-by-folder-name): New function. * wl-summary.el (wl-summary-write-current-folder-functions): Change default value. Use it. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e464bd2..37c5b24 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2000-11-08 TAKAHASHI Kaoru + + * wl-folder.el (wl-folder-guess-mailing-list-by-folder-name): New + function. + * wl-summary.el (wl-summary-write-current-folder-functions): + Change default value. Use it. + 2000-11-08 Yuuichi Teranishi * Version number is increased to 2.4.0. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 90c7f7f..8a11d7b 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -2047,6 +2047,22 @@ Don't care multi." nil nil) nil)))) +(defun wl-folder-guess-mailing-list-by-folder-name (folder) + "Return ML address guess by FOLDER name's last hierarchy. +Use `wl-subscribed-mailing-list'. Don't care multi." + (setq folder (car (elmo-folder-get-primitive-folder-list folder))) + (when (memq (elmo-folder-get-type folder) + '(localdir imap4 maildir)) + (let (key mladdress) + (when (string-match "[^\\./]+$" folder) + (setq key (concat "^" (substring folder (match-beginning 0)) "@")) + (setq mladdress + (elmo-string-matched-member + key wl-subscribed-mailing-list 'case-ignore)) + (if (stringp mladdress) + (list mladdress nil nil) + nil))))) + (defun wl-folder-update-diff-line (diffs) (let ((inhibit-read-only t) (buffer-read-only nil) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 729cb7f..33ca8c1 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -5119,8 +5119,8 @@ Reply to author if invoked with ARG." (defvar wl-summary-write-current-folder-functions '(wl-folder-get-newsgroups -;;; wl-folder-guess-mailing-list-by-refile-rule - ) + wl-folder-guess-mailing-list-by-refile-rule + wl-folder-guess-mailing-list-by-folder-name) "Newsgroups or Mailing List address guess functions list. Call from `wl-summary-write-current-folder'")