From: morioka Date: Wed, 28 Aug 1996 12:41:58 +0000 (+0000) Subject: (std11-field-body): New function. X-Git-Tag: XEmacs-20_3-b27-viet~85 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de91aa233cbc41de372b515d206edab4bb873b6;p=elisp%2Fmu-cite.git (std11-field-body): New function. --- diff --git a/std11.el b/std11.el index 087e207..fef8ca0 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.2 1996-08-28 12:32:17 morioka Exp $ +;; Version: $Id: std11.el,v 0.3 1996-08-28 12:41:58 morioka Exp $ ;; This file is part of tl (Tiny Library). @@ -25,6 +25,9 @@ ;;; Code: +(require 'emu) + + ;;; @ field ;;; @@ -34,6 +37,16 @@ (defconst std11-next-field-head-regexp (concat "\n" std11-field-head-regexp)) +(defun std11-field-body (name &optional boundary) + (save-excursion + (save-restriction + (std11-narrow-to-header) + (goto-char (point-min)) + (let ((case-fold-search t)) + (if (re-search-forward (concat "^" name ":[ \t]*") nil t) + (buffer-substring-no-properties (match-end 0) (std11-field-end)) + ))))) + (defun std11-field-end () (if (re-search-forward std11-next-field-head-regexp nil t) (goto-char (match-beginning 0))