From 4de91aa233cbc41de372b515d206edab4bb873b6 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 28 Aug 1996 12:41:58 +0000 Subject: [PATCH] (std11-field-body): New function. --- std11.el | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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)) -- 1.7.10.4