From 29269eb99ae096b4461d7bdfec59c00c88b98b8c Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 25 Nov 1998 18:08:30 +0000 Subject: [PATCH] (std11-comment-value-to-string): New function. (std11-full-name-string): Use `std11-comment-value-to-string'. --- std11.el | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/std11.el b/std11.el index 616d3ad..658dabc 100644 --- a/std11.el +++ b/std11.el @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko ;; 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)) ) )))) -- 1.7.10.4