release.
[elisp/flim.git] / mime-parse.el
index a445822..15a7a36 100644 (file)
 
 ;;; Code:
 
-(require 'std11)
 (require 'mime-def)
+(require 'std11)
 
-(eval-when-compile (require 'cl))
+(autoload 'mime-entity-body-buffer "mime")
+(autoload 'mime-entity-body-start-point "mime")
+(autoload 'mime-entity-body-end-point "mime")
 
 
 ;;; @ lexical analyzer
@@ -103,8 +105,9 @@ Return value is
 or nil.  PRIMARY-TYPE and SUBTYPE are symbol and NAME_n and VALUE_n
 are string."
   (setq string (std11-unfold-string string))
-  (if (string-match `,(concat "^\\(" mime-token-regexp
-                             "\\)/\\(" mime-token-regexp "\\)") string)
+  (if (string-match (eval-when-compile
+                     (concat "^\\(" mime-token-regexp
+                             "\\)/\\(" mime-token-regexp "\\)")) string)
       (let* ((type (downcase
                    (substring string (match-beginning 1) (match-end 1))))
             (subtype (downcase
@@ -330,7 +333,8 @@ If buffer is omitted, it parses current-buffer."
   (save-excursion
     (if buffer (set-buffer buffer))
     (setq mime-message-structure
-         (mime-parse-message (or representation-type 'buffer) nil))
+         (mime-parse-message (or representation-type
+                                 'mime-buffer-entity) nil))
     ))