update.
[elisp/emh.git] / emh.el
diff --git a/emh.el b/emh.el
index 8479f5d..78dc3a5 100644 (file)
--- a/emh.el
+++ b/emh.el
 ;;; Code:
 
 (require 'mh-e)
+(require 'alist)
 (require 'mime-view)
-(or (get-unified-alist mime-acting-condition '((type . text)))
-    (error "Please install latest SEMI."))
+(eval-when-compile (require 'mime-text))
 
 
 ;;; @ version
 ;;;
 
-(defconst emh-RCS-ID
-  "$Id: emh.el,v 1.7 1998-03-14 23:17:31 morioka Exp $")
-
-(defconst emh-version (get-version-string emh-RCS-ID))
+(defconst emh-version "1.4.0")
 
 
 ;;; @ variable
@@ -231,14 +228,7 @@ digest are inserted into the folder after that message."
 ;;; @ for mime-view
 ;;;
 
-(set-alist 'mime-raw-buffer-coding-system-alist
-          'mh-show-mode 'no-conversion)
-
-(fset 'emh-text-decode-buffer
-      (symbol-function 'mime-text-decode-buffer))
-
-(set-alist 'mime-text-decoder-alist
-          'mh-show-mode #'emh-text-decode-buffer)
+(set-alist 'mime-raw-representation-type-alist 'mh-show-mode 'binary)
 
 (defvar emh-content-header-filter-hook
   (if window-system
@@ -306,18 +296,19 @@ It is registered to variable `mime-view-content-header-filter-alist'."
   "mime-partial"
   "Internal method to combine message/partial messages automatically.")
 
-(set-atype 'mime-acting-condition
-          '((type . message)(type . partial)
-            (method . mime-method-to-combine-message/partial-pieces)
-            (major-mode . mh-show-mode)
-            (summary-buffer-exp
-             . (and (or (string-match "^article-\\(.+\\)$"
-                                      article-buffer)
-                        (string-match "^show-\\(.+\\)$" article-buffer))
-                    (substring article-buffer
-                               (match-beginning 1) (match-end 1))
-                    ))
-            ))
+(mime-add-condition
+ 'action
+ '((type . message)(subtype . partial)
+   (method . mime-method-to-combine-message/partial-pieces)
+   (major-mode . mh-show-mode)
+   (summary-buffer-exp
+    . (and (or (string-match "^article-\\(.+\\)$"
+                            article-buffer)
+              (string-match "^show-\\(.+\\)$" article-buffer))
+          (substring article-buffer
+                     (match-beginning 1) (match-end 1))
+          ))
+   ))
 
 (set-alist 'mime-view-partial-message-method-alist
           'mh-show-mode