2 ;;; tm-gd5.el --- tm-gnus shared module for Gnus 5.*.
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
9 ;;; Created: 1995/11/19
11 ;;; $Id: tm-gd5.el,v 4.0 1996/01/25 02:37:43 morioka Exp $
12 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
14 ;;; This file is part of tm (Tools for MIME).
16 ;;; This program is free software; you can redistribute it and/or
17 ;;; modify it under the terms of the GNU General Public License as
18 ;;; published by the Free Software Foundation; either version 2, or
19 ;;; (at your option) any later version.
21 ;;; This program is distributed in the hope that it will be useful,
22 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 ;;; General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with This program. If not, write to the Free Software
28 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
32 (cond ((not (boundp 'nnheader-encoded-words-decoding))
35 (defun tm-gnus/decode-summary-from-and-subjects ()
36 (mapcar (lambda (header)
37 (let ((from (mail-header-from header))
38 (subj (mail-header-subject header))
43 (mime-eword/decode-string from)
45 (mail-header-set-subject
48 (mime-eword/decode-string
50 subj mime/default-coding-system *internal*))
53 gnus-newsgroup-headers))
55 (add-hook 'gnus-select-group-hook
56 (function tm-gnus/decode-summary-from-and-subjects))
62 (define-service-coding-system gnus-nntp-service nil *noconv*)
63 (if (and (boundp 'nntp-server-process)
64 (processp nntp-server-process)
66 (set-process-coding-system nntp-server-process *noconv* *noconv*)
69 (or (fboundp 'tm-gnus/original-request-article)
70 (fset 'tm-gnus/original-request-article
71 (symbol-function 'gnus-request-article))
74 (defun gnus-request-article (article group &optional buffer)
75 (let ((file-coding-system-for-read *noconv*))
76 (tm-gnus/original-request-article article group buffer)
80 (fset 'tm-gnus/code-convert-region-to-emacs
81 (symbol-function 'mime/code-convert-region-to-emacs))
83 (defun tm-gnus/content-header-filter ()
84 (goto-char (point-min))
85 (mime-preview/cut-header)
86 (tm-gnus/code-convert-region-to-emacs (point-min)(point-max)
87 mime/default-coding-system)
88 (mime/decode-message-header)
97 ;;; tm-gd5.el ends here