1 ;;; tm-setup.el --- setup file for tm viewer.
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: tm-setup.el,v 7.11 1997/02/10 06:11:06 morioka Exp $
7 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
9 ;; This file is part of tm (Tools for MIME).
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
38 ;; for message/partial
42 (set-atype 'mime/content-decoding-condition
43 '((type . "message/external-body")
44 ("access-type" . "anon-ftp")
45 (method . mime-article/decode-message/external-ftp)
47 (autoload 'mime-article/decode-message/external-ftp "tm-ftp")
50 (set-atype 'mime/content-decoding-condition
51 '((type . "text/x-latex")
52 (method . mime/decode-text/latex)
54 (set-atype 'mime/content-decoding-condition
55 '((type . "application/x-latex")
56 (method . mime/decode-text/latex)
58 ;;(set-atype 'mime/content-decoding-condition
59 ;; '((type . "application/octet-stream")
61 ;; (method . mime/decode-text/latex)
63 (autoload 'mime/decode-text/latex "tm-latex")
67 ;; for image/* and X-Face
68 (defvar mime-setup-enable-inline-image
71 (and (featurep 'mule)(module-installed-p 'bitmap))
73 "*If it is non-nil, tm-setup sets up to use tm-image.")
75 (if mime-setup-enable-inline-image
76 (call-after-loaded 'tm-view
84 (defvar mime-setup-enable-pgp
85 (module-installed-p 'mailcrypt)
86 "*If it is non-nil, tm-setup sets uf to use tm-pgp.")
89 (if mime-setup-enable-pgp
90 (call-after-loaded 'tm-view
101 (defun tm-setup/load-rmail ()
102 (or (and (boundp 'rmail-support-mime)
106 (remove-hook 'rmail-mode-hook 'tm-setup/load-rmail)
109 (call-after-loaded 'rmail 'tm-setup/load-rmail 'rmail-mode-hook)
120 (call-after-loaded 'mh-e le 'mh-folder-mode-hook)
121 (if (not (featurep 'mh-e))
122 (add-hook 'mh-letter-mode-hook le)
126 ;;; @ for GNUS and Gnus
130 (if (boundp 'gnus-load-hook)
135 (defvar tm-setup/use-gnusutil nil)
137 (defun tm-setup/load-GNUS ()
141 (if (and (boundp 'MULE) tm-setup/use-gnusutil)
143 (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
144 (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
145 (autoload 'gnusutil-initialize "gnusutil")
146 (autoload 'gnusutil-add-group "gnusutil")
147 (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
149 (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
150 (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
154 (defun tm-setup/load-gnus ()
155 (let (gnus-load-hook)
156 (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
160 (add-hook 'gnus-load-hook 'tm-setup/load-gnus)
169 ;;; tm-setup.el ends here