X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=emh.el;h=ae5187728584191b29adde925a456a980c069af5;hb=8dc82260f139a884c6c76745fafdec35344f027e;hp=5bf713c0c6673db894cb96c4b89d5ced21381e88;hpb=0d4df992c895b0108f75781e1c924952803031ff;p=elisp%2Femh.git diff --git a/emh.el b/emh.el index 5bf713c..ae51877 100644 --- a/emh.el +++ b/emh.el @@ -1,6 +1,6 @@ ;;; emh.el --- MIME extender for mh-e -;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; OKABE Yasuo @@ -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: 0.24 $ ;; Keywords: MH, MIME, multimedia, encoded-word, multilingual, mail ;; This file is part of emh. @@ -32,15 +31,15 @@ (require 'mh-e) (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 0.24 1997-11-27 15:07:49 morioka Exp $") - -(defconst emh-version (get-version-string emh-RCS-ID)) +(defconst emh-version "1.2.0") ;;; @ variable @@ -230,12 +229,11 @@ 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-raw-buffer-coding-system-alist + 'mh-show-mode 'no-conversion) (set-alist 'mime-text-decoder-alist - 'mh-show-mode - (function emh-text-decode-buffer)) + 'mh-show-mode 'mime-text-decode-buffer) (defvar emh-content-header-filter-hook (if window-system @@ -250,8 +248,7 @@ digest are inserted into the folder after that message." It is registered to variable `mime-view-content-header-filter-alist'." (goto-char (point-min)) (mime-view-cut-header) - (emh-text-decode-buffer default-mime-charset) - (eword-decode-header) + (eword-decode-header default-mime-charset) (run-hooks 'emh-content-header-filter-hook) ) @@ -272,9 +269,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)) @@ -301,32 +297,30 @@ 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/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.") + +(set-atype 'mime-acting-condition + '((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 @@ -345,8 +339,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)