- (if (setq f (rfc822/get-field-body "From"))
- (setq from f)
- (and from
- (insert (format "From: %s\n"
- (mime-eword/decode-string from)))
- ))
- (if (setq f (rfc822/get-field-body "To"))
- (setq to f)
- (and to
- (insert (format "To: %s\n"
- (mime-eword/decode-string to)))
- ))
- (if (setq f (rfc822/get-field-body "cc"))
- (setq cc f)
- (and cc
- (insert (format "cc: %s\n"
- (mime-eword/decode-string cc)))
- ))
- (if (setq f (rfc822/get-field-body "Reply-To"))
- (setq reply-to f)
- (and reply-to
- (insert (format "Reply-To: %s\n"
- (mime-eword/decode-string reply-to)))
- ))
- (if (setq f (or (rfc822/get-field-body "Subject")
- (rfc822/get-field-body "Content-Description")))
- (setq subj f)
- (and subj
- (insert (format "Subject: %s\n"
- (mime-eword/decode-string subj)))
- ))
- (if (setq f (rfc822/get-field-body "Message-Id"))
- (setq mid f)
- (and mid
- (insert (format "Message-Id: %s\n"
- (mime-eword/decode-string mid)))
- ))
- (goto-char (point-max))
- (funcall (cdr (assq mode mime-viewer/following-method-alist))
- (or reply-to
- (if (string-equal
- (nth 1 (rfc822/extract-address-components from))
- user-mail-address)
- to
- from))
- cc (and subj
- (if (string-match "^Re:" subj)
- subj
- (concat "Re: " subj))
- ))
- )))))
+ (insert "\n")
+ (goto-char (point-min))
+ (let ((rcnum (mime::content-info/rcnum cinfo)) ci str)
+ (while (progn
+ (setq str
+ (save-excursion
+ (set-buffer a-buf)
+ (setq ci (mime-article/rcnum-to-cinfo rcnum))
+ (save-restriction
+ (narrow-to-region
+ (mime::content-info/point-min ci)
+ (mime::content-info/point-max ci)
+ )
+ (rfc822/get-header-string-except
+ (concat "^"
+ (apply (function regexp-or) fields)
+ ":") ""))))
+ (if (string-equal (mime::content-info/type ci)
+ "message/rfc822")
+ nil
+ (if str
+ (insert str)
+ )
+ rcnum))
+ (setq fields (rfc822/get-field-names)
+ rcnum (cdr rcnum))
+ )
+ )
+ (mime/decode-message-header)
+ )
+ (funcall (cdr (assq mode mime-viewer/following-method-alist))
+ new-buf)
+ ))))