From: hmurata Date: Wed, 12 Nov 2003 04:21:06 +0000 (+0000) Subject: * wl-addrmgr.el (wl-addrmgr-pickup-entry-list): New function. X-Git-Tag: wl-2_11_21~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=28b28712126236b13ffa19d85e9d25f89dd8ecd4;p=elisp%2Fwanderlust.git * wl-addrmgr.el (wl-addrmgr-pickup-entry-list): New function. (wl-addrmgr-merge-entries): Ditto. (wl-addrmgr): Added to address entry which exists in draft buffer if no entry is in original. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 9d26b6b..c20cfb4 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2003-11-12 Hiroya Murata + + * wl-addrmgr.el (wl-addrmgr-pickup-entry-list): New function. + (wl-addrmgr-merge-entries): Ditto. + (wl-addrmgr): Added to address entry which exists in draft buffer + if no entry is in original. + 2003-11-09 Yuuichi Teranishi * wl-batch.el: New file. diff --git a/wl/wl-addrmgr.el b/wl/wl-addrmgr.el index 9bc6ee8..8443e58 100644 --- a/wl/wl-addrmgr.el +++ b/wl/wl-addrmgr.el @@ -171,6 +171,28 @@ See info under Wanderlust for full documentation. (wl-parse-addresses (mapconcat 'identity (elmo-multiple-fields-body-list (list field)) ",")))) +(defun wl-addrmgr-pickup-entry-list (buffer) + "Return a list of address entiry from BUFFER." + (when buffer + (with-current-buffer buffer + (mapcar + (lambda (addr) + (let ((structure (std11-extract-address-components addr))) + (list (cadr structure) + (or (car structure) "") + (or (car structure) "")))) + (wl-parse-addresses + (mapconcat + 'identity + (elmo-multiple-fields-body-list '("to" "cc" "bcc")) ",")))))) + +(defun wl-addrmgr-merge-entries (base-list append-list) + "Return a merged list of address entiry." + (dolist (entry append-list) + (unless (assoc (car entry) base-list) + (setq base-list (nconc base-list (list entry))))) + base-list) + ;;;###autoload (defun wl-addrmgr () "Start an Address manager." @@ -201,7 +223,9 @@ See info under Wanderlust for full documentation. (unless wl-addrmgr-sort-order (setq wl-addrmgr-sort-order wl-addrmgr-default-sort-order)) (setq wl-addrmgr-draft-buffer buffer) - (setq wl-addrmgr-list (wl-addrmgr-list)) + (setq wl-addrmgr-list + (wl-addrmgr-merge-entries (wl-addrmgr-list) + (wl-addrmgr-pickup-entry-list buffer))) (wl-addrmgr-draw already-list) (setq wl-addrmgr-unknown-list already-list) (wl-addrmgr-goto-top)))