From: morioka Date: Tue, 19 Dec 1995 17:57:08 +0000 (+0000) Subject: (rfc822/extract-address-components): New function X-Git-Tag: XEmacs-20_3-b27-viet~136 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f8c890ede4a9f889ee0655e3aeb7e5e2c9e14122;p=elisp%2Fmu-cite.git (rfc822/extract-address-components): New function --- diff --git a/tl-822.el b/tl-822.el index fdae714..0609a32 100644 --- a/tl-822.el +++ b/tl-822.el @@ -15,7 +15,7 @@ (defconst rfc822/RCS-ID - "$Id: tl-822.el,v 7.0 1995-11-16 11:11:56 morioka Exp $") + "$Id: tl-822.el,v 7.1 1995-12-19 17:57:08 morioka Exp $") (defconst rfc822/version (get-version-string rfc822/RCS-ID)) @@ -609,6 +609,20 @@ (or phrase comment) ))) +(defun rfc822/extract-address-components (str) + "Extract full name and canonical address from STR. +Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). +If no name can be extracted, FULL-NAME will be nil. [tl-822.el]" + (let* ((structure (car + (rfc822/parse-address + (rfc822/lexical-analyze str) + ))) + (phrase (rfc822/full-name-string structure)) + (address (rfc822/address-string structure)) + ) + (list phrase address) + )) + ;;; @ end ;;;