From: morioka Date: Fri, 30 Aug 1996 15:32:30 +0000 (+0000) Subject: (std11-find-field-body): New function. X-Git-Tag: XEmacs-20_3-b27-viet~30 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6ca4380a2a96c1791b6ea50ccc993b3bd93edca;p=elisp%2Fmu-cite.git (std11-find-field-body): New function. --- 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