+(cond ((fboundp 'rmail-summary-rmail-update)
+ ;; for Emacs 19 or later
+ (or (fboundp 'tm:rmail-summary-rmail-update)
+ (fset 'tm:rmail-summary-rmail-update
+ (symbol-function 'rmail-summary-rmail-update))
+ )
+
+ (defun rmail-summary-rmail-update ()
+ (tm:rmail-summary-rmail-update)
+ (if tm-rmail/decode-all
+ (let ((win (get-buffer-window rmail-buffer)))
+ (if win
+ (delete-window win)
+ )))
+ )
+
+ (defun tm-rmail/get-Content-Type-and-Content-Transfer-Encoding ()
+ (rmail-widen-to-current-msgbeg
+ (function
+ (lambda ()
+ (cons (mime/Content-Type)
+ (mime/Content-Transfer-Encoding "7bit")
+ )))))
+ )
+ (t
+ ;; for Emacs 18
+ (defun tm-rmail/get-Content-Type-and-Content-Transfer-Encoding ()
+ (save-restriction
+ (rmail-widen-to-current-msgbeg
+ (function
+ (lambda ()
+ (goto-char (point-min))
+ (narrow-to-region (or (and (re-search-forward "^.+:" nil t)
+ (match-beginning 0))
+ (point-min))
+ (point-max))
+ )))
+ (cons (mime/Content-Type)
+ (mime/Content-Transfer-Encoding "7bit")
+ )))
+ ))
+