2 ;;; tm-gnus.el --- MIME extension for GNUS
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; modified by KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>
9 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
10 ;;; Created: 1993/11/20 (obsolete mol's gnus-mime.el)
12 ;;; $Id: tm-gnus.el,v 7.22 1996/06/27 14:43:48 morioka Exp $
13 ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual
15 ;;; This file is part of tm (Tools for MIME).
17 ;;; This program is free software; you can redistribute it and/or
18 ;;; modify it under the terms of the GNU General Public License as
19 ;;; published by the Free Software Foundation; either version 2, or
20 ;;; (at your option) any later version.
22 ;;; This program is distributed in the hope that it will be useful,
23 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 ;;; General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with This program. If not, write to the Free Software
29 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
39 (defvar tm-gnus/startup-hook nil)
45 (cond ((boundp 'gnus-original-article-buffer)
46 ;; for Gnus 5.2 or later
50 "^\\((ding) Gnus\\|Gnus v5\\|September Gnus\\)" gnus-version)
51 (fboundp 'mail-header-from))
52 ;; for Gnus 5.0 .. 5.1.*
54 (cond ((not (boundp 'nnheader-encoded-words-decoding))
56 (defun tm-gnus/decode-summary-from-and-subjects ()
57 (mapcar (lambda (header)
58 (let ((from (mail-header-from header))
59 (subj (mail-header-subject header))
64 (mime-eword/decode-string from)
66 (mail-header-set-subject
69 (mime-eword/decode-string subj)
72 gnus-newsgroup-headers))
73 (add-hook 'gnus-select-group-hook
74 (function tm-gnus/decode-summary-from-and-subjects))
77 ((fboundp 'gnus-article-prepare)
78 ;; for GNUS 3.15 .. 4.*
81 (add-hook 'gnus-select-group-hook 'tm-gnus/decode-summary-subjects)
82 (fset 'gnus-article-set-mode-line
83 (function tm-gnus/article-set-mode-line))
85 (or (fboundp 'tm:gnus-article-delete-headers)
86 (fset 'tm:gnus-article-delete-headers
87 (symbol-function 'gnus-article-delete-headers))
89 (defun gnus-article-delete-headers ()
90 (or tm-gnus/automatic-mime-preview
91 (tm:gnus-article-delete-headers)
95 (or (fboundp 'tm-gnus/original-news-reply)
96 (fset 'tm-gnus/original-news-reply
97 (symbol-function 'gnus-news-reply))
99 (defun gnus-news-reply (&optional yank)
100 (if (eq major-mode 'mime/viewer-mode)
101 (let ((major-mode 'gnus-article-mode))
102 (tm-gnus/original-news-reply yank)
104 (tm-gnus/original-news-reply yank)
107 ((string-match "^GNUS 3" gnus-version)
110 (defvar gnus-article-buffer gnus-Article-buffer)
119 (run-hooks 'tm-gnus-load-hook)
121 ;;; tm-gnus.el ends here