annotate lisp/tm/tm-setup.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents d95e72db5c07
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
1 ;;; tm-setup.el --- setup file for tm viewer.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
2
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
6 ;; Version: $Id: tm-setup.el,v 1.5 1997/02/16 01:29:34 steve Exp $
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
7 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
8
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
9 ;; This file is part of tm (Tools for MIME).
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
10
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
11 ;; This program is free software; you can redistribute it and/or
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
12 ;; modify it under the terms of the GNU General Public License as
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
13 ;; published by the Free Software Foundation; either version 2, or (at
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
14 ;; your option) any later version.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
15
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
16 ;; This program is distributed in the hope that it will be useful, but
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
19 ;; General Public License for more details.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
20
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 16
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 16
diff changeset
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
24 ;; Boston, MA 02111-1307, USA.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
25
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
26 ;;; Code:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
27
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
28 (require 'tl-misc)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
29
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
30
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
31 ;;; @ for tm-view
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
32 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
33
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
34 (call-after-loaded
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
35 'tm-view
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
36 (function
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
37 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
38 ;; for message/partial
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
39 (require 'tm-partial)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
40
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
41 ;; for anonymous ftp
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
42 (set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
43 '((type . "message/external-body")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
44 ("access-type" . "anon-ftp")
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 16
diff changeset
45 (method . mime-article/decode-message/external-ftp)
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
46 ))
18
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 16
diff changeset
47 (autoload 'mime-article/decode-message/external-ftp "tm-ftp")
d95e72db5c07 Import from CVS: tag r19-15b92
cvs
parents: 16
diff changeset
48
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
49 ;; for LaTeX
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
50 (set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
51 '((type . "text/x-latex")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
52 (method . mime/decode-text/latex)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
53 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
54 (set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
55 '((type . "application/x-latex")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
56 (method . mime/decode-text/latex)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
57 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
58 ;;(set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
59 ;; '((type . "application/octet-stream")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
60 ;; ("type" . "latex")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
61 ;; (method . mime/decode-text/latex)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
62 ;; ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
63 (autoload 'mime/decode-text/latex "tm-latex")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
64 )))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
65
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
66
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
67 ;; for image/* and X-Face
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
68 (defvar mime-setup-enable-inline-image
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
69 (and window-system
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
70 (or running-xemacs
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
71 (and (featurep 'mule)(module-installed-p 'bitmap))
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
72 ))
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
73 "*If it is non-nil, tm-setup sets up to use tm-image.")
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
74
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
75 (if mime-setup-enable-inline-image
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
76 (call-after-loaded 'tm-view
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
77 (function
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
78 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
79 (require 'tm-image)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
80 )))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
81 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
82
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
83
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
84 (defvar mime-setup-enable-pgp
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
85 (module-installed-p 'mailcrypt)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
86 "*If it is non-nil, tm-setup sets uf to use tm-pgp.")
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
87
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
88 ;; for PGP
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 8
diff changeset
89 (if mime-setup-enable-pgp
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
90 (call-after-loaded 'tm-view
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
91 (function
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
92 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
93 (require 'tm-pgp)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
94 )))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
95 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
96
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
97
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
98 ;;; @ for RMAIL
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
99 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
100
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
101 (defun tm-setup/load-rmail ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
102 (or (and (boundp 'rmail-support-mime)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
103 rmail-support-mime)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
104 (require 'tm-rmail)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
105 )
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
106 (remove-hook 'rmail-mode-hook 'tm-setup/load-rmail)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
107 )
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
108
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 18
diff changeset
109 (call-after-loaded 'rmail 'tm-setup/load-rmail 'rmail-mode-hook)
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
110
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
111
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
112 ;;; @ for mh-e
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
113 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
114
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
115 (let ((le (function
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
116 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
117 (require 'tm-mh-e)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
118 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
119 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
120 (call-after-loaded 'mh-e le 'mh-folder-mode-hook)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
121 (if (not (featurep 'mh-e))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
122 (add-hook 'mh-letter-mode-hook le)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
123 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
124
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
125
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
126 ;;; @ for GNUS and Gnus
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
127 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
128
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
129 (if (featurep 'gnus)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
130 (if (boundp 'gnus-load-hook)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
131 (require 'gnus-mime)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
132 (require 'tm-gnus)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
133 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
134 ;; for GNUS
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
135 (defvar tm-setup/use-gnusutil nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
136
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
137 (defun tm-setup/load-GNUS ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
138 (require 'tm-gnus)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
139 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
140
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
141 (if (and (boundp 'MULE) tm-setup/use-gnusutil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
142 (progn
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
143 (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
144 (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
145 (autoload 'gnusutil-initialize "gnusutil")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
146 (autoload 'gnusutil-add-group "gnusutil")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
147 (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
148 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
149 (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
150 (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
151 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
152
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
153 ;; for Gnus
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
154 (defun tm-setup/load-gnus ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
155 (let (gnus-load-hook)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
156 (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
157 (require 'gnus-mime)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
158 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
159
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
160 (add-hook 'gnus-load-hook 'tm-setup/load-gnus)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
161 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
162
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
163
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
164 ;;; @ end
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
165 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
166
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
167 (provide 'tm-setup)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
168
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
169 ;;; tm-setup.el ends here