From: kaoru Date: Fri, 23 Nov 2001 10:42:48 +0000 (+0000) Subject: * wl-folder.el (wl-folder-guess-mailing-list-by-refile-rule): X-Git-Tag: wl-2_8-root~118 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=77bda77cdad0967d6a175b5b1c89166f7f46ab39;p=elisp%2Fwanderlust.git * wl-folder.el (wl-folder-guess-mailing-list-by-refile-rule): Change local variable name. (wl-folder-guess-mailing-list-by-folder-name): Ditto. (wl-folder-get-newsgroups): Return nil when non-news folder. * wl-summary.el (wl-summary-write-current-folder): State through when guess-list return nil. (wl-summary-write-current-folder-functions): Fixed docstring. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 71329c9..14053e9 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,13 @@ 2001-11-23 TAKAHASHI Kaoru + * wl-folder.el (wl-folder-guess-mailing-list-by-refile-rule): + Change local variable name. + (wl-folder-guess-mailing-list-by-folder-name): Ditto. + (wl-folder-get-newsgroups): Return nil when non-news folder. + * wl-summary.el (wl-summary-write-current-folder): State through + when guess-list return nil. + (wl-summary-write-current-folder-functions): Fixed docstring. + * wl.el (wl-exit): Changed confirm message. * wl.el (wl-init): (require 'mime-setup) move to toplevel. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index d86f63e..6c97427 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -2029,10 +2029,11 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (defun wl-folder-get-newsgroups (folder) "Return Newsgroups field value string for FOLDER newsgroup. If FOLDER is multi, return comma separated string (cross post)." - (list nil nil (mapconcat 'identity - (elmo-folder-newsgroups - (wl-folder-get-elmo-folder folder)) - ","))) + (let ((nlist (elmo-folder-newsgroups + (wl-folder-get-elmo-folder folder)))) + (if nlist + (list nil nil (mapconcat 'identity nlist ",")) + nil))) (defun wl-folder-guess-mailing-list-by-refile-rule (entity) "Return ML address guess by FOLDER. @@ -2040,17 +2041,18 @@ Use `wl-subscribed-mailing-list' and `wl-refile-rule-alist'." (let ((flist (elmo-folder-get-primitive-list (wl-folder-get-elmo-folder entity))) - fld ret mlist) + fld mladdr to) (while (setq fld (car flist)) - (if (setq ret - (wl-folder-guess-mailing-list-by-refile-rule-subr - (elmo-folder-name-internal fld))) - (setq mlist (if (stringp mlist) - (concat mlist ", " ret) - ret))) + (setq mladdr (wl-folder-guess-mailing-list-by-refile-rule-subr + (elmo-folder-name-internal fld))) + (when mladdr + (setq to (if (stringp to) + (concat to ", " mladdr) + mladdr))) (setq flist (cdr flist))) - (if mlist - (list mlist nil nil)))) + (if (stringp to) + (list to nil nil) + nil))) (defun wl-folder-guess-mailing-list-by-refile-rule-subr (entity) (unless (memq (elmo-folder-type entity) @@ -2077,17 +2079,18 @@ Use `wl-subscribed-mailing-list'." (let ((flist (elmo-folder-get-primitive-list (wl-folder-get-elmo-folder entity))) - fld ret mlist) + fld mladdr to) (while (setq fld (car flist)) - (if (setq ret - (wl-folder-guess-mailing-list-by-folder-name-subr - (elmo-folder-name-internal fld))) - (setq mlist (if (stringp mlist) - (concat mlist ", " ret) - ret))) + (setq mladdr (wl-folder-guess-mailing-list-by-folder-name-subr + (elmo-folder-name-internal fld))) + (when mladdr + (setq to (if (stringp to) + (concat to ", " mladdr) + mladdr))) (setq flist (cdr flist))) - (if mlist - (list mlist nil nil)))) + (if (stringp to) + (list to nil nil) + nil))) (defun wl-folder-guess-mailing-list-by-folder-name-subr (entity) (when (memq (elmo-folder-type entity) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 6ec84a8..651966c 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4904,7 +4904,8 @@ Reply to author if invoked with ARG." 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'") +Call from `wl-summary-write-current-folder'. +When guess function return nil, challenge next guess-function.") (defun wl-summary-write-current-folder (&optional folder) "Write message to current FOLDER's newsgroup or mailing-list. @@ -4917,11 +4918,15 @@ Use function list is `wl-summary-write-current-folder-functions'." guess-list) (while flist (setq guess-list (funcall (car flist) folder)) - (if (or (nth 0 guess-list) ; To: -;;; (nth 1 guess-list) ; Cc: - (nth 2 guess-list)) ; Newsgroups: - (setq flist nil) - (setq flist (cdr flist)))) + (cond ((null guess-list) + (setq flist (cdr flist))) + ;; To: or Newsgroups: + ((or (stringp (nth 0 guess-list)) + (stringp (nth 2 guess-list))) + (setq flist nil)) + ;; (nil X nil) or error case + (t + (setq flist (cdr flist))))) (when (null guess-list) (error "Can't guess by folder %s" folder)) (wl-draft (nth 0 guess-list) nil nil ; To: