X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=emh.el;h=78dc3a52e2d347ae9ec2e2578bc27f155fb0fce9;hb=4f23bbd131a09444fd9a124f0dbe53532d43ca75;hp=75efd007a045eeaf547323a30c61855548167611;hpb=8c369178444f0c92169752924429f796b60c8d89;p=elisp%2Femh.git diff --git a/emh.el b/emh.el index 75efd00..78dc3a5 100644 --- a/emh.el +++ b/emh.el @@ -8,7 +8,6 @@ ;; Created: 1993/11/21 ;; Renamed: 1993/11/27 from mh-e-mime.el ;; Renamed: 1997/02/21 from tm-mh-e.el -;; Version: $Revision: 1.2 $ ;; Keywords: MH, MIME, multimedia, encoded-word, multilingual, mail ;; This file is part of emh. @@ -31,16 +30,15 @@ ;;; Code: (require 'mh-e) +(require 'alist) (require 'mime-view) +(eval-when-compile (require 'mime-text)) ;;; @ version ;;; -(defconst emh-RCS-ID - "$Id: emh.el,v 1.2 1998-03-13 13:03:17 morioka Exp $") - -(defconst emh-version (get-version-string emh-RCS-ID)) +(defconst emh-version "1.4.0") ;;; @ variable @@ -230,12 +228,7 @@ digest are inserted into the folder after that message." ;;; @ for mime-view ;;; -(fset 'emh-text-decode-buffer - (symbol-function 'mime-text-decode-buffer)) - -(set-alist 'mime-text-decoder-alist - 'mh-show-mode - (function emh-text-decode-buffer)) +(set-alist 'mime-raw-representation-type-alist 'mh-show-mode 'binary) (defvar emh-content-header-filter-hook (if window-system @@ -271,9 +264,8 @@ It is registered to variable `mime-view-content-header-filter-alist'." (mh-show (mh-get-msg-num t)) )) -(set-alist 'mime-view-quitting-method-alist - 'mh-show-mode - (function emh-quitting-method)) +(set-alist 'mime-preview-quitting-method-alist + 'mh-show-mode #'emh-quitting-method) (set-alist 'mime-view-show-summary-method 'mh-show-mode (function emh-quitting-method)) @@ -300,32 +292,31 @@ It is registered to variable `mime-view-content-header-filter-alist'." ;;; @@ for mime-partial ;;; -(eval-after-load - "mime-view" - '(progn - (autoload 'mime-combine-message/partials-automatically - "mime-partial" - "Internal method to combine message/partial messages automatically.") - (set-atype 'mime-acting-condition - '((type . message)(type . partial) - (method . mime-combine-message/partials-automatically) - (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 - (function - (lambda () - (let ((emh-automatic-mime-preview t)) - (emh-show) - )))) - )) +(autoload 'mime-method-to-combine-message/partial-pieces + "mime-partial" + "Internal method to combine message/partial messages automatically.") + +(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 + (function + (lambda () + (let ((emh-automatic-mime-preview t)) + (emh-show) + )))) ;;; @ set up @@ -344,8 +335,8 @@ It is registered to variable `mime-view-content-header-filter-alist'." (if buf (let ((the-buf (current-buffer))) (switch-to-buffer buf) - (if (and mime-view-buffer - (setq buf (get-buffer mime-view-buffer)) + (if (and mime-preview-buffer + (setq buf (get-buffer mime-preview-buffer)) ) (progn (switch-to-buffer the-buf)