tm 7.76.
[elisp/tm.git] / tm-setup.el
1 ;;;
2 ;;; tm-setup.el --- setup file for tm viewer.
3 ;;;
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
6 ;;;
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; Version:
9 ;;;     $Id: tm-setup.el,v 7.4 1996/08/06 12:12:53 morioka Exp $
10 ;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
11 ;;;
12 ;;; This file is part of tm (Tools for MIME).
13 ;;;
14 ;;; This program is free software; you can redistribute it and/or
15 ;;; modify it under the terms of the GNU General Public License as
16 ;;; published by the Free Software Foundation; either version 2, or
17 ;;; (at your option) any later version.
18 ;;;
19 ;;; This program is distributed in the hope that it will be useful,
20 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22 ;;; General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with This program.  If not, write to the Free Software
26 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27 ;;;
28 ;;; Code:
29
30 (require 'tl-misc)
31
32
33 ;;; @ for tm-view
34 ;;;
35
36 (call-after-loaded
37  'tm-view
38  (function
39   (lambda ()
40     ;; for message/partial
41     (require 'tm-partial)
42     
43     ;; for anonymous ftp
44     (set-atype 'mime/content-decoding-condition
45                '((type . "message/external-body")
46                  ("access-type" . "anon-ftp")
47                  (method . mime/decode-message/external-ftp)
48                  ))
49     (autoload 'mime/decode-message/external-ftp "tm-ftp")
50     
51     ;; for image/*
52     (if running-xemacs
53         (require 'tm-image)
54       )
55     
56     ;; for LaTeX
57     (set-atype 'mime/content-decoding-condition
58                '((type . "text/x-latex")
59                  (method . mime/decode-text/latex)
60                  ))
61     (set-atype 'mime/content-decoding-condition
62                '((type . "application/x-latex")
63                  (method . mime/decode-text/latex)
64                  ))
65     ;;(set-atype 'mime/content-decoding-condition
66     ;;  '((type . "application/octet-stream")
67     ;;            ("type" . "latex")
68     ;;            (method . mime/decode-text/latex)
69     ;;            ))
70     (autoload 'mime/decode-text/latex "tm-latex")
71     )))
72
73
74 ;;; @ for RMAIL
75 ;;;
76
77 (call-after-loaded 'rmail
78                    (function
79                     (lambda ()
80                       (require 'tm-rmail)
81                       ))
82                    'rmail-mode-hook)
83
84
85 ;;; @ for mh-e
86 ;;;
87
88 (let ((le (function
89            (lambda ()
90              (require 'tm-mh-e)
91              ))
92           ))
93   (call-after-loaded 'mh-e le 'mh-folder-mode-hook)
94   (if (not (featurep 'mh-e))
95       (add-hook 'mh-letter-mode-hook le)
96     ))
97
98
99 ;;; @ for GNUS
100 ;;;
101
102 (defvar tm-setup/use-gnusutil nil)
103
104 (defun tm-setup/load-GNUS ()
105   (require 'tm-gnus)
106   )
107
108 (if (and (boundp 'MULE) tm-setup/use-gnusutil)
109     (progn
110       (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
111       (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
112       (autoload 'gnusutil-initialize "gnusutil")
113       (autoload 'gnusutil-add-group "gnusutil")
114       (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
115       )
116   (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
117   (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
118   )
119
120
121 ;;; @ for Gnus
122 ;;;
123
124 (defun tm-setup/load-gnus ()
125   (let (gnus-load-hook)
126     (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
127     (require 'gnus-mime)
128     ))
129
130 (add-hook 'gnus-load-hook 'tm-setup/load-gnus)
131
132
133 ;;; @ end
134 ;;;
135
136 (provide 'tm-setup)
137
138 ;;; tm-setup.el ends here