66309d31031eeb36236c30e0606f79d91d7f2382
[elisp/semi.git] / semi-setup.el
1 ;;; mime-setup.el --- setup file for MIME-View.
2
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: semi-setup.el,v 0.2 1997-02-21 06:44:40 tmorioka Exp $
7 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
8
9 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
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
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.
25
26 ;;; Code:
27
28 (require 'tl-misc)
29
30
31 ;;; @ for mime-view
32 ;;;
33
34 (call-after-loaded
35  'mime-view
36  (function
37   (lambda ()
38     ;; for message/partial
39     (require 'mime-partial)
40     
41     ;; for anonymous ftp
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)
46                  ))
47     (autoload 'mime-article/decode-message/external-ftp "tm-ftp")
48     
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
67 ;; for image/* and X-Face
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, semi-setup sets up to use mime-image.")
74
75 (if mime-setup-enable-inline-image
76     (call-after-loaded 'mime-view
77                        (function
78                         (lambda ()
79                           (require 'mime-image)
80                           )))
81   )
82
83
84 (defvar mime-setup-enable-pgp
85   (module-installed-p 'mailcrypt)
86   "*If it is non-nil, semi-setup sets uf to use tm-pgp.")
87
88 ;; for PGP
89 (if mime-setup-enable-pgp
90     (call-after-loaded 'mime-view
91                        (function
92                         (lambda ()
93                           (require 'tm-pgp)
94                           )))
95   )
96
97
98 ;;; @ for mh-e
99 ;;;
100
101 (defun semi-setup-load-emh ()
102   (require 'emh)
103   )
104
105 (call-after-loaded 'mh-e 'semi-setup-load-emh 'mh-folder-mode-hook)
106 (or (featurep 'mh-e)
107     (add-hook 'mh-letter-mode-hook 'semi-setup-load-emh)
108     )
109
110
111 ;;; @ for Gnus
112 ;;;
113   
114 (defun semi-setup-load-gnus ()
115   (let (gnus-load-hook)
116     (require 'gnus-mime)
117     ))
118
119 (add-hook 'gnus-load-hook 'semi-setup-load-gnus)
120
121
122 ;;; @ end
123 ;;;
124
125 (provide 'semi-setup)
126
127 ;;; semi-setup.el ends here