From: ueno Date: Sun, 27 Aug 2000 03:14:21 +0000 (+0000) Subject: * wl-summary.el (wl-summary-default-from): Return full-name part X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1d33b12216eb13f3626f9a92ed9f62833d02828;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-default-from): Return full-name part from the address if no petname was found. (wl-summary-simple-from): Ditto. * wl-address.el (wl-address-get-petname): Return nil if no petname associated with the address was found. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 076c32a..1db5c9b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2000-08-27 Daiki Ueno + + * wl-summary.el (wl-summary-default-from): Return full-name part + from the address if no petname was found. + (wl-summary-simple-from): Ditto. + + * wl-address.el (wl-address-get-petname): Return nil if no petname + associated with the address was found. + 2000-08-23 Masahiro MURATA * wl-folder.el (wl-folder-open-all): Remove progress gauge when diff --git a/wl/wl-address.el b/wl/wl-address.el index a7eda88..293c514 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -540,10 +540,9 @@ Matched address lists are append to CL." (forward-line)) ret)))) -(defsubst wl-address-get-petname (str) - (let ((addr (downcase (wl-address-header-extract-address str)))) - (or (elmo-get-hash-val addr wl-address-petname-hash) - str))) +(defsubst wl-address-get-petname (string) + (let ((address (downcase (wl-address-header-extract-address string)))) + (elmo-get-hash-val address wl-address-petname-hash))) (defsubst wl-address-user-mail-address-p (address) "Judge whether ADDRESS is user's or not." diff --git a/wl/wl-summary.el b/wl/wl-summary.el index afe979f..53ac569 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -205,25 +205,28 @@ (function (lambda (to) (eword-decode-string - (if wl-use-petname - (wl-address-get-petname to) - (or - (car (std11-extract-address-components to)) - to))))) + (or (if wl-use-petname + (wl-address-get-petname to)) + (car + (std11-extract-address-components to)) + to)))) (wl-parse-addresses tos) ",")))) ((setq ng (elmo-msgdb-overview-entity-get-extra-field entity "newsgroups")) (setq retval (concat "Ng:" ng))))) - (if wl-use-petname - (setq retval (wl-address-get-petname from)) - (setq retval from))) + (setq retval + (or (if wl-use-petname + (wl-address-get-petname from)) + (car (std11-extract-address-components from)) + from))) retval)) (defun wl-summary-simple-from (string) - (if wl-use-petname - (wl-address-get-petname string) - string)) + (or (if wl-use-petname + (wl-address-get-petname string)) + (car (std11-extract-address-components string)) + string)) (defvar wl-summary-mode-menu-spec '("Summary"