From: hmurata Date: Fri, 5 Aug 2005 14:38:11 +0000 (+0000) Subject: (wl-addrbook-get-names): Abolish. X-Git-Tag: wl-2_15_3~61 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4b64128f5a4f309b36119e8fc2afe9b73b4a7f6a;p=elisp%2Fwanderlust.git (wl-addrbook-get-names): Abolish. (wl-summary-addrbook-from): Ditto. (wl-addrbook-get-nickname): New function. --- diff --git a/utils/ChangeLog b/utils/ChangeLog index 244d26e..f0462cd 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,9 @@ +2005-08-05 Hiroya Murata + + * wl-addrbook.el (wl-addrbook-get-names): Abolish. + (wl-summary-addrbook-from): Ditto. + (wl-addrbook-get-nickname): New function. + 2005-02-24 Katsumi Yamaoka * ptexinfmt.el (texinfo-multitable-widths): Reverse the logic that diff --git a/utils/wl-addrbook.el b/utils/wl-addrbook.el index 9a1c302..36f80fd 100644 --- a/utils/wl-addrbook.el +++ b/utils/wl-addrbook.el @@ -553,36 +553,10 @@ The keys that are defined for this mode are: ;;; Show nick name of Addrbook in summary. ;;; -(defsubst wl-addrbook-get-names (names) - (let (addrs) - (mapconcat - (function - (lambda (name) - (or (wl-addrbook-nickname-get - (wl-address-header-extract-address name)) - (and (setq addrs (std11-extract-address-components name)) - (or (car addrs) (cadr addrs)))))) - (wl-parse-addresses names) - ","))) - -(eval-when-compile (defvar-maybe entity nil)) ; silence byte compiler. -(defun wl-summary-addrbook-from (from) - "A candidate for wl-summary-from-function. -Show destination in summary matched by `wl-summary-show-dest-folder-regexp'. -And use Addrbook for get user name." - (let ((fromaddr (wl-address-header-extract-address from)) - dest) - (or - (and (eq major-mode 'wl-summary-mode) - (string-match wl-summary-showto-folder-regexp - wl-summary-buffer-folder-name) - (wl-address-user-mail-address-p fromaddr) - (cond ((setq dest (elmo-message-entity-field entity 'to)) - (concat "To:" (eword-decode-string (wl-addrbook-get-names dest)))) - ((setq dest (elmo-message-entity-field entity 'newsgroups)) - (concat "Ng:" dest)))) - (wl-addrbook-nickname-get fromaddr) - from))) +(defun wl-addrbook-get-nickname (mailbox) + "For `wl-summary-get-petname-function'." + (wl-addrbook-nickname-get + (wl-address-header-extract-address mailbox))) (provide 'wl-addrbook)