From b0f44239571ca64f087175bc4face1c84aaf32a4 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 23 May 1999 09:31:42 +0000 Subject: [PATCH] (mime-entity-buffer): Define as obsolete function. (mime-entity-body-end-point): New generic function; define `mime-entity-body-end' as obsolete function. (mime-goto-body-start-point): New generic function. (mime-entity-uu-filename): Use `mime-goto-body-start-point' and `mime-entity-body-end-point'. --- mime.el | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/mime.el b/mime.el index 2837d0a..5982b35 100644 --- a/mime.el +++ b/mime.el @@ -146,6 +146,10 @@ If MESSAGE is specified, it is regarded as root entity." (luna-define-generic mime-entity-buffer (entity)) +(make-obsolete + 'mime-entity-buffer + "use mime-entity-header-buffer or mime-entity-body-buffer instead.") + (luna-define-generic mime-entity-header-buffer (entity)) (luna-define-generic mime-entity-body-buffer (entity)) @@ -154,13 +158,22 @@ If MESSAGE is specified, it is regarded as root entity." (luna-define-generic mime-entity-point-max (entity)) +(luna-define-generic mime-entity-body-end-point (entity) + "Set buffer and point to body-start-position of ENTITY.") -;;; @ Entity Header -;;; +(define-obsolete-function-alias + 'mime-entity-body-end 'mime-entity-body-end-point) (luna-define-generic mime-goto-header-start-point (entity) "Set buffer and point to header-start-position of ENTITY.") +(luna-define-generic mime-goto-body-start-point (entity) + "Set buffer and point to body-start-position of ENTITY.") + + +;;; @ Entity Header +;;; + (luna-define-generic mime-entity-fetch-field (entity field-name) "Return the value of the ENTITY's header field whose type is FIELD-NAME.") @@ -284,10 +297,9 @@ If MESSAGE is specified, it is regarded as root entity." (defun mime-entity-uu-filename (entity) (if (member (mime-entity-encoding entity) mime-uuencode-encoding-name-list) (save-excursion - (set-buffer (mime-entity-buffer entity)) - (goto-char (mime-entity-body-start entity)) + (mime-goto-body-start-point entity) (if (re-search-forward "^begin [0-9]+ " - (mime-entity-body-end entity) t) + (mime-entity-body-end-point entity) t) (if (looking-at ".+$") (buffer-substring (match-beginning 0)(match-end 0)) ))))) -- 1.7.10.4