From 1577386f28d3a5fcfbb5fc613c652fa8e5dedece Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 23 Jun 1998 14:26:28 +0000 Subject: [PATCH] Modify for interface change in SEMI 1.8 about automatic message/partial combining. --- emh.el | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/emh.el b/emh.el index 7b95f74..32d5ff2 100644 --- a/emh.el +++ b/emh.el @@ -38,7 +38,7 @@ ;;; @ version ;;; -(defconst emh-version "1.6.1") +(defconst emh-version "1.8.0") ;;; @ variable @@ -287,6 +287,24 @@ digest are inserted into the folder after that message." ;;; @@ for mime-partial ;;; +(defun emh-request-partial-message () + (let ((msg-filename (mh-msg-filename (mh-get-msg-num t))) + (show-buffer mh-show-buffer)) + (set-buffer (get-buffer-create " *Partial Article*")) + (erase-buffer) + (setq mime-preview-buffer show-buffer) + (insert-file-contents-as-raw-text msg-filename) + (mime-parse-buffer) + )) + +(defun emh-get-folder-buffer () + (let ((buffer-name (buffer-name (current-buffer)))) + (and (or (string-match "^article-\\(.+\\)$" buffer-name) + (string-match "^show-\\(.+\\)$" buffer-name)) + (substring buffer-name + (match-beginning 1) (match-end 1)) + ))) + (autoload 'mime-combine-message/partial-pieces-automatically "mime-partial" "Internal method to combine message/partial messages automatically.") @@ -294,25 +312,12 @@ digest are inserted into the folder after that message." (mime-add-condition 'action '((type . message)(subtype . partial) - (method . mime-combine-message/partial-pieces-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)) - )) + (method . mime-combine-message/partial-pieces-automatically) + (summary-buffer-exp . (emh-get-folder-buffer)) + (request-partial-message-method . emh-request-partial-message) )) -(set-alist 'mime-view-partial-message-method-alist - 'mh-show-mode - (function - (lambda () - (let ((emh-automatic-mime-preview t)) - (emh-show) - )))) - ;;; @ set up ;;; -- 1.7.10.4