* nnheader.el (std11-extract-addresses-components): Protect against nil
authoryamaoka <yamaoka>
Tue, 8 Jan 2002 04:49:52 +0000 (04:49 +0000)
committeryamaoka <yamaoka>
Tue, 8 Jan 2002 04:49:52 +0000 (04:49 +0000)
 argument.

ChangeLog
lisp/nnheader.el

index 7684314..85c9dc8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-01-08  Katsumi Yamaoka <yamaoka@jpl.org>
 
+       * lisp/nnheader.el (std11-extract-addresses-components): Protect
+       against nil argument.
+
+2002-01-08  Katsumi Yamaoka <yamaoka@jpl.org>
+
        * lisp/nnheader.el (mail-header-field-value): Alias to
        `std11-field-value'.
        (std11-field-value): New function.
index 6fab90f..5cc00b2 100644 (file)
@@ -1237,15 +1237,16 @@ find-file-hooks, etc.
 
   (defalias 'mail-header-fold-field 'std11-fold-field)
 
-  (defun-maybe std11-extract-addresses-components (string)
+  (defun std11-extract-addresses-components (string)
     "Extract a list of full name and canonical address from STRING.  Each
 element looks like a list of the form (FULL-NAME CANONICAL-ADDRESS).
 If no name can be extracted, FULL-NAME will be nil."
-    (mapcar (function
-            (lambda (structure)
-              (list (std11-full-name-string structure)
-                    (std11-address-string structure))))
-           (std11-parse-addresses-string (std11-unfold-string string))))
+    (when string
+      (mapcar (function
+              (lambda (structure)
+                (list (std11-full-name-string structure)
+                      (std11-address-string structure))))
+             (std11-parse-addresses-string (std11-unfold-string string)))))
 
   (defun mail-header-parse-addresses (string)
     "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs."