4
|
1 ;;; tm-setup.el --- setup file for tm viewer.
|
|
2
|
16
|
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
|
4
|
4
|
|
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
|
18
|
6 ;; Version: $Id: tm-setup.el,v 1.4 1997/02/04 02:36:07 steve Exp $
|
4
|
7 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
|
|
8
|
|
9 ;; This file is part of tm (Tools for MIME).
|
|
10
|
|
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.
|
|
15
|
|
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.
|
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
18
|
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
4
|
24 ;; Boston, MA 02111-1307, USA.
|
|
25
|
|
26 ;;; Code:
|
|
27
|
|
28 (require 'tl-misc)
|
|
29
|
|
30
|
|
31 ;;; @ for tm-view
|
|
32 ;;;
|
|
33
|
|
34 (call-after-loaded
|
|
35 'tm-view
|
|
36 (function
|
|
37 (lambda ()
|
|
38 ;; for message/partial
|
|
39 (require 'tm-partial)
|
|
40
|
|
41 ;; for anonymous ftp
|
|
42 (set-atype 'mime/content-decoding-condition
|
|
43 '((type . "message/external-body")
|
|
44 ("access-type" . "anon-ftp")
|
18
|
45 (method . mime-article/decode-message/external-ftp)
|
4
|
46 ))
|
18
|
47 (autoload 'mime-article/decode-message/external-ftp "tm-ftp")
|
|
48
|
4
|
49 ;; for LaTeX
|
|
50 (set-atype 'mime/content-decoding-condition
|
|
51 '((type . "text/x-latex")
|
|
52 (method . mime/decode-text/latex)
|
|
53 ))
|
|
54 (set-atype 'mime/content-decoding-condition
|
|
55 '((type . "application/x-latex")
|
|
56 (method . mime/decode-text/latex)
|
|
57 ))
|
|
58 ;;(set-atype 'mime/content-decoding-condition
|
|
59 ;; '((type . "application/octet-stream")
|
|
60 ;; ("type" . "latex")
|
|
61 ;; (method . mime/decode-text/latex)
|
|
62 ;; ))
|
|
63 (autoload 'mime/decode-text/latex "tm-latex")
|
|
64 )))
|
|
65
|
16
|
66
|
4
|
67 ;; for image/* and X-Face
|
16
|
68 (defvar mime-setup-enable-inline-image
|
|
69 (and window-system
|
|
70 (or running-xemacs
|
|
71 (and (featurep 'mule)(module-installed-p 'bitmap))
|
|
72 ))
|
|
73 "*If it is non-nil, tm-setup sets up to use tm-image.")
|
|
74
|
|
75 (if mime-setup-enable-inline-image
|
4
|
76 (call-after-loaded 'tm-view
|
|
77 (function
|
|
78 (lambda ()
|
|
79 (require 'tm-image)
|
|
80 )))
|
|
81 )
|
|
82
|
16
|
83
|
|
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.")
|
|
87
|
4
|
88 ;; for PGP
|
16
|
89 (if mime-setup-enable-pgp
|
4
|
90 (call-after-loaded 'tm-view
|
|
91 (function
|
|
92 (lambda ()
|
|
93 (require 'tm-pgp)
|
|
94 )))
|
|
95 )
|
|
96
|
|
97
|
|
98 ;;; @ for RMAIL
|
|
99 ;;;
|
|
100
|
8
|
101 (or running-xemacs-with-mule
|
|
102 (call-after-loaded 'rmail
|
|
103 (function
|
|
104 (lambda ()
|
|
105 (require 'tm-rmail)
|
|
106 ))
|
|
107 'rmail-mode-hook)
|
|
108 )
|
4
|
109
|
|
110
|
|
111 ;;; @ for mh-e
|
|
112 ;;;
|
|
113
|
|
114 (let ((le (function
|
|
115 (lambda ()
|
|
116 (require 'tm-mh-e)
|
|
117 ))
|
|
118 ))
|
|
119 (call-after-loaded 'mh-e le 'mh-folder-mode-hook)
|
|
120 (if (not (featurep 'mh-e))
|
|
121 (add-hook 'mh-letter-mode-hook le)
|
|
122 ))
|
|
123
|
|
124
|
|
125 ;;; @ for GNUS and Gnus
|
|
126 ;;;
|
|
127
|
|
128 (if (featurep 'gnus)
|
|
129 (if (boundp 'gnus-load-hook)
|
|
130 (require 'gnus-mime)
|
|
131 (require 'tm-gnus)
|
|
132 )
|
|
133 ;; for GNUS
|
|
134 (defvar tm-setup/use-gnusutil nil)
|
|
135
|
|
136 (defun tm-setup/load-GNUS ()
|
|
137 (require 'tm-gnus)
|
|
138 )
|
|
139
|
|
140 (if (and (boundp 'MULE) tm-setup/use-gnusutil)
|
|
141 (progn
|
|
142 (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
|
|
143 (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
|
|
144 (autoload 'gnusutil-initialize "gnusutil")
|
|
145 (autoload 'gnusutil-add-group "gnusutil")
|
|
146 (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
|
|
147 )
|
|
148 (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
|
|
149 (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
|
|
150 )
|
|
151
|
|
152 ;; for Gnus
|
|
153 (defun tm-setup/load-gnus ()
|
|
154 (let (gnus-load-hook)
|
|
155 (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
|
|
156 (require 'gnus-mime)
|
|
157 ))
|
|
158
|
|
159 (add-hook 'gnus-load-hook 'tm-setup/load-gnus)
|
|
160 )
|
|
161
|
|
162
|
|
163 ;;; @ end
|
|
164 ;;;
|
|
165
|
|
166 (provide 'tm-setup)
|
|
167
|
|
168 ;;; tm-setup.el ends here
|