From: yamaoka Date: Tue, 8 Jan 2002 04:49:52 +0000 (+0000) Subject: * nnheader.el (std11-extract-addresses-components): Protect against nil X-Git-Tag: t-gnus-6_15_5-00-quimby~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=822cae2cf2445286cda8a90f57d224fb88965498;p=elisp%2Fgnus.git- * nnheader.el (std11-extract-addresses-components): Protect against nil argument. --- diff --git a/ChangeLog b/ChangeLog index 7684314..85c9dc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-01-08 Katsumi Yamaoka + * lisp/nnheader.el (std11-extract-addresses-components): Protect + against nil argument. + +2002-01-08 Katsumi Yamaoka + * lisp/nnheader.el (mail-header-field-value): Alias to `std11-field-value'. (std11-field-value): New function. diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 6fab90f..5cc00b2 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -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."