(mime-entity-buffer): Define as obsolete function.
authormorioka <morioka>
Sun, 23 May 1999 09:31:42 +0000 (09:31 +0000)
committermorioka <morioka>
Sun, 23 May 1999 09:31:42 +0000 (09:31 +0000)
(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

diff --git a/mime.el b/mime.el
index 2837d0a..5982b35 100644 (file)
--- 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))
              )))))