2 ;;; tm-gnus.el --- MIME extension for GNUS
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1993,1994,1995 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.13 1995/12/08 22:35:14 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.
37 (defvar tm-gnus/startup-hook nil)
43 (cond ((boundp 'gnus-original-article-buffer)
44 ;; for September Gnus and Gnus 5.2 ..
48 "^\\((ding) Gnus\\|Gnus v5\\|September Gnus\\)" gnus-version)
49 (fboundp 'mail-header-from))
50 ;; for Gnus 5.0 .. 5.1.*
54 ((fboundp 'gnus-article-prepare)
55 ;; for GNUS 3.15 .. 4.*
58 (add-hook 'gnus-select-group-hook 'tm-gnus/decode-summary-subjects)
59 (fset 'gnus-article-set-mode-line
60 (function tm-gnus/article-set-mode-line))
62 ((string-match "^GNUS 3" gnus-version)
65 (defvar gnus-article-buffer gnus-Article-buffer)
71 ;; suggested by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
72 ;; 1995/11/08 (c.f. [tm ML:1067])
73 (defun tm-gnus/insert-article (&optional message)
76 (mail-citation-hook '(mime-editor/inserted-message-filter))
77 news-reply-header-hook
81 (mail-yank-ignored-headers mime-editor/yank-ignored-field-regexp)
82 (news-make-reply-yank-header (function
83 (lambda (message-id from) "")
85 (news-yank-original-quoting-indicator "")
87 ;; select raw article buffer
90 (set-buffer gnus-article-buffer)
91 (if (eq major-mode 'mime/viewer-mode)
92 mime::preview/article-buffer
93 gnus-article-buffer)))
95 (news-reply-yank-original 0)
98 ;;; modified by Steven L. Baur <steve@miranova.com>
99 ;;; 1995/12/6 (c.f. [tm-en:209])
100 (defun mime-editor/attach-to-news-reply-menu ()
101 "Arrange to attach MIME editor's popup menu to VM's"
102 (if (boundp 'news-reply-menu)
104 (setq news-reply-menu (append news-reply-menu
106 mime-editor/popup-menu-for-xemacs))
107 (remove-hook 'news-setup-hook
108 'mime-editor/attach-to-news-reply-menu)
116 'mime-editor/message-inserter-alist
117 'news-reply-mode (function tm-gnus/insert-article))
119 (autoload 'tm-mail/insert-message "tm-mail")
120 (set-alist 'mime-editor/message-inserter-alist
121 'mail-mode (function tm-mail/insert-message))
122 (if (string-match "XEmacs\\|Lucid" emacs-version)
123 (add-hook 'news-setup-hook 'mime-editor/attach-to-news-reply-menu)
133 (run-hooks 'tm-gnus-load-hook)