tm 7.67.
[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.3 1996/05/08 15:00:00 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 (let ((le (function
105            (lambda ()
106              (require 'tm-gnus)
107              ))
108           ))
109   (if (and (boundp 'MULE) tm-setup/use-gnusutil)
110       (progn
111         (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
112         (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
113         (autoload 'gnusutil-initialize "gnusutil")
114         (autoload 'gnusutil-add-group "gnusutil")
115         (add-hook 'gnusutil-initialize-hook le)
116         )
117     (progn
118       (add-hook 'gnus-Startup-hook le 'append)
119       (add-hook 'gnus-startup-hook le 'append)
120       )))
121
122
123 ;;; @ end
124 ;;;
125
126 (provide 'tm-setup)
127
128 ;;; tm-setup.el ends here