1 ;;; semi-setup.el --- setup file for MIME-View.
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: semi-setup.el,v 0.5 1997-02-27 13:37:11 tmorioka Exp $
7 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
9 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
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.
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.
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.
36 (defun call-after-loaded (module func &optional hook-name)
37 "If MODULE is provided, then FUNC is called.
38 Otherwise func is set to MODULE-load-hook.
39 If optional argument HOOK-NAME is specified,
40 it is used as hook to set."
44 (setq hook-name (intern (concat (symbol-name module) "-load-hook")))
46 (add-hook hook-name func)
57 ;; for message/partial
58 (require 'mime-partial)
61 (set-atype 'mime/content-decoding-condition
62 '((type . "message/external-body")
63 ("access-type" . "anon-ftp")
64 (method . mime-article/decode-message/external-ftp)
66 (autoload 'mime-article/decode-message/external-ftp "tm-ftp")
69 (set-atype 'mime/content-decoding-condition
70 '((type . "text/x-latex")
71 (method . mime/decode-text/latex)
73 (set-atype 'mime/content-decoding-condition
74 '((type . "application/x-latex")
75 (method . mime/decode-text/latex)
77 ;;(set-atype 'mime/content-decoding-condition
78 ;; '((type . "application/octet-stream")
80 ;; (method . mime/decode-text/latex)
82 (autoload 'mime/decode-text/latex "tm-latex")
86 (defvar running-xemacs (string-match "XEmacs" emacs-version))
88 ;; for image/* and X-Face
89 (defvar mime-setup-enable-inline-image
92 (and (featurep 'mule)(module-installed-p 'bitmap))
94 "*If it is non-nil, semi-setup sets up to use mime-image.")
96 (if mime-setup-enable-inline-image
97 (call-after-loaded 'mime-view
100 (require 'mime-image)
105 (defvar mime-setup-enable-pgp
106 (module-installed-p 'mailcrypt)
107 "*If it is non-nil, semi-setup sets uf to use tm-pgp.")
110 (if mime-setup-enable-pgp
111 (call-after-loaded 'mime-view
122 (defun semi-setup-load-emh ()
126 (call-after-loaded 'mh-e 'semi-setup-load-emh 'mh-folder-mode-hook)
128 (add-hook 'mh-letter-mode-hook 'semi-setup-load-emh)
135 (defun semi-setup-load-gnus ()
136 (let (gnus-load-hook)
140 (add-hook 'gnus-load-hook 'semi-setup-load-gnus)
146 (provide 'semi-setup)
148 ;;; semi-setup.el ends here