From b7a453aec6033b0722c3a2bc390558ed5852568b Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 2 Sep 1996 15:47:29 +0000 Subject: [PATCH] (std11-extract-address-components): New function; moved from tl-822.el. --- std11.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/std11.el b/std11.el index 0df4628..ae3470e 100644 --- a/std11.el +++ b/std11.el @@ -4,9 +4,9 @@ ;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: $Id: std11.el,v 0.25 1996-08-30 15:32:30 morioka Exp $ +;; Version: $Id: std11.el,v 0.26 1996-09-02 15:47:29 morioka Exp $ -;; This file is part of tl (Tiny Library). +;; This file is part of MU (Message Utilities). ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -267,6 +267,17 @@ represents addr-spec of RFC 822. [std11.el]" (std11-parse-addresses (std11-lexical-analyze string)) ) +(defun std11-extract-address-components (string) + "Extract full name and canonical address from STRING. +Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). +If no name can be extracted, FULL-NAME will be nil. [std11.el]" + (let* ((structure (car (std11-parse-address-string string))) + (phrase (std11-full-name-string structure)) + (address (std11-address-string structure)) + ) + (list phrase address) + )) + (provide 'std11) (mapcar (function -- 1.7.10.4