;;; @ version
;;;
-(defconst emh-version "1.6.1")
+(defconst emh-version "1.8.0")
;;; @ variable
;;; @@ 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.")
(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
;;;