4
|
1 ;;; tm-setup.el --- setup file for tm viewer.
|
|
2
|
70
|
3 ;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc.
|
4
|
4
|
|
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
|
74
|
6 ;; Version: $Id: tm-setup.el,v 1.1.1.2 1996/12/21 20:50:45 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
|
70
|
22 ;; along with This program; see the file COPYING. If not, write to
|
|
23 ;; the 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")
|
70
|
45 (method . mime/decode-message/external-ftp)
|
4
|
46 ))
|
70
|
47 (autoload 'mime/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
|
|
66 ;; for image/* and X-Face
|
70
|
67 (if running-xemacs
|
4
|
68 (call-after-loaded 'tm-view
|
|
69 (function
|
|
70 (lambda ()
|
|
71 (require 'tm-image)
|
|
72 )))
|
|
73 )
|
|
74
|
|
75 ;; for PGP
|
70
|
76 (if (module-installed-p 'mailcrypt)
|
4
|
77 (call-after-loaded 'tm-view
|
|
78 (function
|
|
79 (lambda ()
|
|
80 (require 'tm-pgp)
|
|
81 )))
|
|
82 )
|
|
83
|
|
84
|
|
85 ;;; @ for RMAIL
|
|
86 ;;;
|
|
87
|
74
|
88 (or running-xemacs-with-mule
|
|
89 (call-after-loaded 'rmail
|
|
90 (function
|
|
91 (lambda ()
|
|
92 (require 'tm-rmail)
|
|
93 ))
|
|
94 'rmail-mode-hook)
|
|
95 )
|
4
|
96
|
|
97
|
|
98 ;;; @ for mh-e
|
|
99 ;;;
|
|
100
|
|
101 (let ((le (function
|
|
102 (lambda ()
|
|
103 (require 'tm-mh-e)
|
|
104 ))
|
|
105 ))
|
|
106 (call-after-loaded 'mh-e le 'mh-folder-mode-hook)
|
|
107 (if (not (featurep 'mh-e))
|
|
108 (add-hook 'mh-letter-mode-hook le)
|
|
109 ))
|
|
110
|
|
111
|
|
112 ;;; @ for GNUS and Gnus
|
|
113 ;;;
|
|
114
|
|
115 (if (featurep 'gnus)
|
|
116 (if (boundp 'gnus-load-hook)
|
|
117 (require 'gnus-mime)
|
|
118 (require 'tm-gnus)
|
|
119 )
|
|
120 ;; for GNUS
|
|
121 (defvar tm-setup/use-gnusutil nil)
|
|
122
|
|
123 (defun tm-setup/load-GNUS ()
|
|
124 (require 'tm-gnus)
|
|
125 )
|
|
126
|
|
127 (if (and (boundp 'MULE) tm-setup/use-gnusutil)
|
|
128 (progn
|
|
129 (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
|
|
130 (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
|
|
131 (autoload 'gnusutil-initialize "gnusutil")
|
|
132 (autoload 'gnusutil-add-group "gnusutil")
|
|
133 (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
|
|
134 )
|
|
135 (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
|
|
136 (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
|
|
137 )
|
|
138
|
|
139 ;; for Gnus
|
|
140 (defun tm-setup/load-gnus ()
|
|
141 (let (gnus-load-hook)
|
|
142 (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
|
|
143 (require 'gnus-mime)
|
|
144 ))
|
|
145
|
|
146 (add-hook 'gnus-load-hook 'tm-setup/load-gnus)
|
|
147 )
|
|
148
|
|
149
|
|
150 ;;; @ end
|
|
151 ;;;
|
|
152
|
|
153 (provide 'tm-setup)
|
|
154
|
|
155 ;;; tm-setup.el ends here
|