* wl-summary.el (wl-summary-default-from): Use
authorueno <ueno>
Mon, 28 Aug 2000 00:43:00 +0000 (00:43 +0000)
committerueno <ueno>
Mon, 28 Aug 2000 00:43:00 +0000 (00:43 +0000)
`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
wl/wl-address.el
wl/wl-summary.el

index 1db5c9b..e54683d 100644 (file)
@@ -1,3 +1,12 @@
+2000-08-28   Daiki Ueno  <ueno@unixuser.org>
+
+       * 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  <ueno@unixuser.org>
 
        * wl-summary.el (wl-summary-default-from): Return full-name part
index 293c514..031cc97 100644 (file)
@@ -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))
index 53ac569..a400397 100644 (file)
                              (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"