X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fwl-addrbook.el;h=5a8c3a9eea84eeb690167ff88c15f3069f7dd736;hb=62bd32794da4e4f6f35be9ffb4e0d1f27f97a3d1;hp=9a1c30223572281c6ef509e55bbc62307809d1aa;hpb=bab54f41b8a506a9b948379314dc68c202d5fa59;p=elisp%2Fwanderlust.git diff --git a/utils/wl-addrbook.el b/utils/wl-addrbook.el index 9a1c302..5a8c3a9 100644 --- a/utils/wl-addrbook.el +++ b/utils/wl-addrbook.el @@ -100,8 +100,8 @@ If nil, the old 'user' entry remains.") ;; hash table for wl-addrbook-alist (defmacro wl-addrbook-hashtb () - (` (or wl-addrbook-hashtb - (setq wl-addrbook-hashtb (elmo-make-hash 1021))))) + '(or wl-addrbook-hashtb + (setq wl-addrbook-hashtb (elmo-make-hash 1021)))) (defsubst wl-addrbook-get-record-by-addr (addr &optional alist) (elmo-get-hash-val (downcase addr) (wl-addrbook-hashtb))) @@ -137,7 +137,7 @@ If nil, the old 'user' entry remains.") (setq wl-address-init-function 'wl-addrbook-init) ;; (when wl-summary-use-addrbook-from-func - (setq wl-summary-from-function 'wl-summary-addrbook-from)) + (setq wl-summary-get-petname-function 'wl-addrbook-get-nickname)) (define-key wl-summary-mode-map "\C-c\C-a" 'wl-summary-addrbook-add) (define-key wl-draft-mode-map "\C-i" 'wl-draft-addrbook-header-comp-or-tab) (define-key wl-draft-mode-map "\e\t" 'wl-draft-addrbook-expand) @@ -180,10 +180,10 @@ If nil, the old 'user' entry remains.") ;; (defmacro wl-alias-get (key) - (` (wl-addrbook-alias-get (, key) wl-addrbook-alist))) + `(wl-addrbook-alias-get ,key wl-addrbook-alist)) (defmacro wl-alias-next (key) - (` (wl-addrbook-alias-next (, key) wl-addrbook-alist))) + `(wl-addrbook-alias-next ,key wl-addrbook-alist)) (defalias 'wl-addrbook-alias-hit 'wl-addrbook-get-record-by-alias) @@ -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)