From b3f0acdc36c40d51e88aff4882200c1893ea2947 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 28 Aug 2000 00:43:00 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-default-from): Use `wl-address-get-petname-1'. (wl-summary-simple-from): Ditto. * wl-address.el (wl-address-get-petname-1): New inline function. (wl-address-get-petname): Use it. --- wl/ChangeLog | 9 +++++++++ wl/wl-address.el | 6 +++++- wl/wl-summary.el | 31 +++++++++++++++++-------------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 1db5c9b..e54683d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2000-08-28 Daiki Ueno + + * wl-summary.el (wl-summary-default-from): Use + `wl-address-get-petname-1'. + (wl-summary-simple-from): Ditto. + + * wl-address.el (wl-address-get-petname-1): New inline function. + (wl-address-get-petname): Use it. + 2000-08-27 Daiki Ueno * wl-summary.el (wl-summary-default-from): Return full-name part diff --git a/wl/wl-address.el b/wl/wl-address.el index 293c514..031cc97 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -540,10 +540,14 @@ Matched address lists are append to CL." (forward-line)) ret)))) -(defsubst wl-address-get-petname (string) +(defsubst wl-address-get-petname-1 (string) (let ((address (downcase (wl-address-header-extract-address string)))) (elmo-get-hash-val address wl-address-petname-hash))) +(defsubst wl-address-get-petname (string) + (or (wl-address-get-petname-1 string) + string)) + (defsubst wl-address-user-mail-address-p (address) "Judge whether ADDRESS is user's or not." (member (downcase (wl-address-header-extract-address address)) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 53ac569..a400397 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -205,28 +205,31 @@ (function (lambda (to) (eword-decode-string - (or (if wl-use-petname - (wl-address-get-petname to)) - (car - (std11-extract-address-components to)) - to)))) + (if wl-use-petname + (or + (wl-address-get-petname-1 to) + (car + (std11-extract-address-components to)) + to) + to)))) (wl-parse-addresses tos) ",")))) ((setq ng (elmo-msgdb-overview-entity-get-extra-field entity "newsgroups")) (setq retval (concat "Ng:" ng))))) - (setq retval - (or (if wl-use-petname - (wl-address-get-petname from)) - (car (std11-extract-address-components from)) - from))) + (if wl-use-petname + (setq retval (or (wl-address-get-petname-1 from) + (car (std11-extract-address-components from)) + from)) + (setq retval from))) retval)) (defun wl-summary-simple-from (string) - (or (if wl-use-petname - (wl-address-get-petname string)) - (car (std11-extract-address-components string)) - string)) + (if wl-use-petname + (or (wl-address-get-petname-1 string) + (car (std11-extract-address-components string)) + string) + string)) (defvar wl-summary-mode-menu-spec '("Summary" -- 1.7.10.4