;;; ;;; $Id: tm-gnus3.el,v 2.0 1994/07/24 08:33:00 morioka Exp morioka $ ;;; (provide 'tm-gnus3) (require 'tm-gnus) (if (and (null gnus-Startup-hook) (boundp 'gnus-startup-hook)) (setq gnus-Startup-hook gnus-startup-hook) ) (if (and (null gnus-Select-group-hook) (boundp 'gnus-select-group-hook)) (setq gnus-Select-group-hook gnus-select-group-hook) ) (if (and (null gnus-Subject-mode-hook) (boundp 'gnus-summary-mode-hook)) (setq gnus-Subject-mode-hook gnus-summary-mode-hook) ) (if (and (null gnus-Article-mode-hook) (boundp 'gnus-article-mode-hook)) (setq gnus-Article-mode-hook gnus-article-mode-hook) ) (if (and (null gnus-Article-prepare-hook) (boundp 'gnus-article-prepare-hook)) (setq gnus-Article-prepare-hook gnus-article-prepare-hook) ) (defun tm-gnus/full-decode-message-old (arg) "MIME full-decode this article." (interactive "P") (let ((gnus-Article-prepare-hook mime/body-decoding-method)) ;; The following is a trick ;; to force to read the current article again. (setq gnus-have-all-headers (not gnus-have-all-headers)) (gnus-summary-select-article (not gnus-have-all-headers) t) )) (add-hook 'gnus-Select-group-hook (function (lambda () (mapcar (function (lambda (header) (nntp-set-header-subject header (mime/decode-string (gnus-header-subject header)) ))) gnus-newsgroup-headers) ))) (define-key gnus-Subject-mode-map "\et" 'tm-gnus/toggle-mime-header-decoding-mode) (define-key gnus-Subject-mode-map "v" 'tm-gnus/play-message) (define-key gnus-Subject-mode-map "e" 'tm-gnus/extract-message) (define-key gnus-Subject-mode-map "\C-cp" 'tm-gnus/print-message) (fset 'gnus-summary-select-article 'gnus-Subject-select-article) (fset 'gnus-Article-set-mode-line 'tm-gnus/article-set-mode-line) (add-hook 'gnus-Article-prepare-hook (function (lambda () (if mime/header-decoding-mode (mime/decode-message-header) ))) t) (if (not (string-match "^GNUS 3\.14\.4" gnus-version)) (progn (add-hook 'gnus-Article-mode-hook (function (lambda () (make-local-variable 'minor-mode-alist) (mime/add-header-decoding-mode-to-mode-line) ))) (fset 'tm-gnus/full-decode-message 'tm-gnus/full-decode-message-old) ) (progn (add-hook 'gnus-Article-mode-hook (function mime/add-header-decoding-mode-to-mode-line)) (fset 'tm-gnus/full-decode-message 'tm-gnus/full-decode-message-new) (setq gnus-show-mime-method mime/body-decoding-method) ))