(std11-addr-to-string): New function; moved from tl-822.el.
[elisp/apel.git] / std11.el
index 3dd9c10..33c8588 100644 (file)
--- a/std11.el
+++ b/std11.el
@@ -4,7 +4,7 @@
 
 ;; Author:   MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; 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
 ;;;