From: hmurata Date: Sat, 16 Apr 2005 11:32:39 +0000 (+0000) Subject: (wl-summary-default-from): Simplify. X-Git-Tag: wl-2_15_3~82 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d2c2602d552ce4de212e9020ba703184b3a64710;p=elisp%2Fwanderlust.git (wl-summary-default-from): Simplify. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index ccaa38d..eb273ed 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,7 @@ +2005-04-16 Hiroya Murata + + * wl-summary.el (wl-summary-default-from): Simplify. + 2005-04-10 Hiroya Murata * wl-action.el (wl-summary-exec-action-refile): Simplify. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index af3397a..9878554 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -211,38 +211,25 @@ summary's folder name matches with `wl-summary-showto-folder-regexp' and (2) sender address is yours. See also variable `wl-use-petname'." - (let (retval tos ng) - (unless - (and (eq major-mode 'wl-summary-mode) + (let ((translator (if wl-use-petname + (lambda (string) + (or (funcall wl-summary-get-petname-function string) + (car (std11-extract-address-components string)) + string)) + #'identity)) + to ng) + (or (and (eq major-mode 'wl-summary-mode) (stringp wl-summary-showto-folder-regexp) (string-match wl-summary-showto-folder-regexp (wl-summary-buffer-folder-name)) (wl-address-user-mail-address-p from) (cond - ((setq tos (elmo-message-entity-field wl-message-entity 'to)) - (setq retval - (concat "To:" - (mapconcat - (lambda (to) - (if wl-use-petname - (or - (funcall - wl-summary-get-petname-function to) - (car - (std11-extract-address-components to)) - to) - to)) - tos - ",")))) - ((setq ng (elmo-message-entity-field - wl-message-entity 'newsgroups)) - (setq retval (concat "Ng:" ng))))) - (if wl-use-petname - (setq retval (or (funcall wl-summary-get-petname-function from) - (car (std11-extract-address-components from)) - from)) - (setq retval from))) - retval)) + ((setq to (elmo-message-entity-field wl-message-entity 'to)) + (concat "To:" (mapconcat translator to ","))) + ((setq ng (elmo-message-entity-field wl-message-entity + 'newsgroups)) + (concat "Ng:" ng)))) + (funcall translator from)))) (defun wl-summary-simple-from (string) (if wl-use-petname