(std11-comment-value-to-string): New function.
authormorioka <morioka>
Wed, 25 Nov 1998 18:08:30 +0000 (18:08 +0000)
committermorioka <morioka>
Wed, 25 Nov 1998 18:08:30 +0000 (18:08 +0000)
(std11-full-name-string): Use `std11-comment-value-to-string'.

std11.el

index 616d3ad..658dabc 100644 (file)
--- a/std11.el
+++ b/std11.el
@@ -5,7 +5,7 @@
 ;; Author:   MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: mail, news, RFC 822, STD 11
 
-;; This file is part of MU (Message Utilities).
+;; This file is part of FLIM (Faithful Library about Internet Message).
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -24,8 +24,8 @@
 
 ;;; Code:
 
-(autoload 'buffer-substring-no-properties "emu")
-(autoload 'member "emu")
+(or (fboundp 'buffer-substring-no-properties)
+    (require 'poe))
 
 
 ;;; @ field
@@ -737,9 +737,23 @@ represents addr-spec of RFC 822. [std11.el]"
              )
            )))))
 
+(defun std11-comment-value-to-string (value)
+  (let ((dest ""))
+    (if (stringp value)
+       (setq dest (std11-strip-quoted-pair value))
+      (while value
+       (setq dest (concat dest
+                          (if (stringp (car value))
+                              (car value)
+                            (std11-comment-value-to-string (cdr (car value)))
+                            ))
+             value (cdr value))
+       ))
+    (concat "(" dest ")")
+    ))
+
 (defun std11-full-name-string (address)
-  "Return string of full-name part from parsed ADDRESS of RFC 822.
-\[std11.el]"
+  "Return string of full-name part from parsed ADDRESS of RFC 822."
   (cond ((eq (car address) 'group)
         (mapconcat (function
                     (lambda (token)
@@ -761,10 +775,7 @@ represents addr-spec of RFC 822. [std11.el]"
                                  (std11-strip-quoted-pair (cdr token))
                                  )
                                 ((eq type 'comment)
-                                 (concat
-                                  "("
-                                  (std11-strip-quoted-pair (cdr token))
-                                  ")")
+                                 (std11-comment-value-to-string (cdr token))
                                  )
                                 (t
                                  (cdr token)
@@ -772,7 +783,7 @@ represents addr-spec of RFC 822. [std11.el]"
                      (nth 1 addr) ""))
             )
           (cond ((> (length phrase) 0) phrase)
-                (comment (std11-strip-quoted-pair comment))
+                (comment (std11-comment-value-to-string comment))
                 )
           ))))