From: morioka Date: Wed, 28 Aug 1996 12:41:58 +0000 (+0000) Subject: (std11-field-body): New function. X-Git-Tag: XEmacs-20_3-b6~67 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8274b1442ba93f3be93c4aabf76f36f2527e07d1;p=elisp%2Fapel.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))