From 66eec7cca1eb73ad4719385602b28ff07b96af5a Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 28 Aug 1996 21:01:41 +0000 Subject: [PATCH] (std11-addr-to-string): New function; moved from tl-822.el. (std11-address-string): New function; moved from tl-822.el. --- std11.el | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/std11.el b/std11.el index 3dd9c10..33c8588 100644 --- a/std11.el +++ b/std11.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: $Id: std11.el,v 0.18 1996-08-28 20:54:43 morioka Exp $ +;; Version: $Id: std11.el,v 0.19 1996-08-28 21:01:41 morioka Exp $ ;; This file is part of tl (Tiny Library). @@ -192,6 +192,31 @@ If BOUNDARY is not nil, it is used as message header separator. (std11-parse-address (std11-lexical-analyze string)) ) +(defun std11-addr-to-string (seq) + (mapconcat (function + (lambda (token) + (if (eq (car token) 'spaces) + "" + (cdr token) + ))) + seq "") + ) + +(defun std11-address-string (address) + (cond ((eq (car address) 'group) + (mapconcat (function std11-address-string) + (car (cdr address)) + ", ") + ) + ((eq (car address) 'mailbox) + (let ((addr (nth 1 address))) + (std11-addr-to-string + (if (eq (car addr) 'phrase-route-addr) + (nth 2 addr) + (cdr addr) + ) + ))))) + ;;; @ end ;;; -- 1.7.10.4