X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=std11.el;h=0df46282a876a118cf95805146d48d3158a6e2df;hb=e6ca4380a2a96c1791b6ea50ccc993b3bd93edca;hp=13642721cb0dc6252d4d1300a8939b59ed56b0b0;hpb=9566b7650a72c931034ad225773f49da58d60752;p=elisp%2Fmu-cite.git diff --git a/std11.el b/std11.el index 1364272..0df4628 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.24 1996-08-30 06:11:58 morioka Exp $ +;; Version: $Id: std11.el,v 0.25 1996-08-30 15:32:30 morioka Exp $ ;; This file is part of tl (Tiny Library). @@ -62,6 +62,26 @@ If BOUNDARY is not nil, it is used as message header separator. (buffer-substring-no-properties (match-end 0) (std11-field-end)) ))))) +(defun std11-find-field-body (field-names &optional boundary) + "Return the first found field-body specified by FIELD-NAMES +of the message header in current buffer. If BOUNDARY is not nil, it is +used as message header separator. [std11.el]" + (save-excursion + (save-restriction + (std11-narrow-to-header boundary) + (let ((case-fold-search t) + field-name) + (catch 'tag + (while (setq field-name (car field-names)) + (goto-char (point-min)) + (if (re-search-forward (concat "^" field-name ":[ \t]*") nil t) + (throw 'tag + (buffer-substring-no-properties + (match-end 0) (std11-field-end))) + ) + (setq field-names (cdr field-names)) + )))))) + (defun std11-field-bodies (field-names &optional default-value boundary) "Return list of each field-bodies of FIELD-NAMES of the message header in current buffer. If BOUNDARY is not nil, it is used as message