Mercurial > emacs
annotate lisp/gnus/mailcap.el @ 86087:d03f0a543d19
(C_entries): In case '}', set fvdef to fvnone
unconditioned to (!ignoreindent && lp == newlb.buffer + 1).
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Thu, 15 Nov 2007 13:32:27 +0000 |
parents | a3c27999decb |
children | 781256628613 880960b70474 |
rev | line source |
---|---|
33821 | 1 ;;; mailcap.el --- MIME media types configuration |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
2 |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
75347 | 4 ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
31717 | 5 |
6 ;; Author: William M. Perry <wmperry@aventail.com> | |
7 ;; Lars Magne Ingebrigtsen <larsi@gnus.org> | |
33821 | 8 ;; Keywords: news, mail, multimedia |
31717 | 9 |
10 ;; This file is part of GNU Emacs. | |
11 | |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
13 ;; it under the terms of the GNU General Public License as published by | |
78224
24202b793a08
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
75347
diff
changeset
|
14 ;; the Free Software Foundation; either version 3, or (at your option) |
31717 | 15 ;; any later version. |
16 | |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64085 | 24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 ;; Boston, MA 02110-1301, USA. | |
31717 | 26 |
27 ;;; Commentary: | |
28 | |
33821 | 29 ;; Provides configuration of MIME media types from directly from Lisp |
30 ;; and via the usual mailcap mechanism (RFC 1524). Deals with | |
31 ;; mime.types similarly. | |
32 | |
31717 | 33 ;;; Code: |
34 | |
35 (eval-when-compile (require 'cl)) | |
36 (require 'mail-parse) | |
37 (require 'mm-util) | |
38 | |
33821 | 39 (defgroup mailcap nil |
40 "Definition of viewers for MIME types." | |
41 :version "21.1" | |
42 :group 'mime) | |
43 | |
31717 | 44 (defvar mailcap-parse-args-syntax-table |
45 (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table))) | |
46 (modify-syntax-entry ?' "\"" table) | |
47 (modify-syntax-entry ?` "\"" table) | |
48 (modify-syntax-entry ?{ "(" table) | |
49 (modify-syntax-entry ?} ")" table) | |
50 table) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
51 "A syntax table for parsing SGML attributes.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
52 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
53 (eval-and-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
54 (when (featurep 'xemacs) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
55 (condition-case nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
56 (require 'lpr) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
57 (error nil)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
58 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
59 (defvar mailcap-print-command |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
60 (mapconcat 'identity |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
61 (cons (if (boundp 'lpr-command) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
62 lpr-command |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
63 "lpr") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
64 (when (boundp 'lpr-switches) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
65 (if (stringp lpr-switches) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
66 (list lpr-switches) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
67 lpr-switches))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
68 " ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
69 "Shell command (including switches) used to print Postscript files.") |
31717 | 70 |
33821 | 71 ;; Postpone using defcustom for this as it's so big and we essentially |
72 ;; have to have two copies of the data around then. Perhaps just | |
73 ;; customize the Lisp viewers and rely on the normal configuration | |
74 ;; files for the rest? -- fx | |
31717 | 75 (defvar mailcap-mime-data |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
76 `(("application" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
77 ("vnd.ms-excel" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
78 (viewer . "gnumeric %s") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
79 (test . (getenv "DISPLAY")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
80 (type . "application/vnd.ms-excel")) |
31717 | 81 ("x-x509-ca-cert" |
82 (viewer . ssl-view-site-cert) | |
83 (test . (fboundp 'ssl-view-site-cert)) | |
84 (type . "application/x-x509-ca-cert")) | |
85 ("x-x509-user-cert" | |
86 (viewer . ssl-view-user-cert) | |
87 (test . (fboundp 'ssl-view-user-cert)) | |
88 (type . "application/x-x509-user-cert")) | |
89 ("octet-stream" | |
90 (viewer . mailcap-save-binary-file) | |
91 (non-viewer . t) | |
92 (type . "application/octet-stream")) | |
93 ("dvi" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
94 (viewer . "xdvi -safer %s") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
95 (test . (eq window-system 'x)) |
31717 | 96 ("needsx11") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
97 (type . "application/dvi") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
98 ("print" . "dvips -qRP %s")) |
31717 | 99 ("dvi" |
100 (viewer . "dvitty %s") | |
101 (test . (not (getenv "DISPLAY"))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
102 (type . "application/dvi") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
103 ("print" . "dvips -qRP %s")) |
31717 | 104 ("emacs-lisp" |
105 (viewer . mailcap-maybe-eval) | |
106 (type . "application/emacs-lisp")) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
107 ("x-emacs-lisp" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
108 (viewer . mailcap-maybe-eval) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
109 (type . "application/x-emacs-lisp")) |
31717 | 110 ("x-tar" |
111 (viewer . mailcap-save-binary-file) | |
112 (non-viewer . t) | |
113 (type . "application/x-tar")) | |
114 ("x-latex" | |
115 (viewer . tex-mode) | |
116 (test . (fboundp 'tex-mode)) | |
117 (type . "application/x-latex")) | |
118 ("x-tex" | |
119 (viewer . tex-mode) | |
120 (test . (fboundp 'tex-mode)) | |
121 (type . "application/x-tex")) | |
122 ("latex" | |
123 (viewer . tex-mode) | |
124 (test . (fboundp 'tex-mode)) | |
125 (type . "application/latex")) | |
126 ("tex" | |
127 (viewer . tex-mode) | |
128 (test . (fboundp 'tex-mode)) | |
129 (type . "application/tex")) | |
130 ("texinfo" | |
131 (viewer . texinfo-mode) | |
132 (test . (fboundp 'texinfo-mode)) | |
133 (type . "application/tex")) | |
134 ("zip" | |
135 (viewer . mailcap-save-binary-file) | |
136 (non-viewer . t) | |
137 (type . "application/zip") | |
138 ("copiousoutput")) | |
33821 | 139 ("pdf" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
140 (viewer . "gv -safer %s") |
33821 | 141 (type . "application/pdf") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
142 (test . window-system) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
143 ("print" . ,(concat "pdf2ps %s - | " mailcap-print-command))) |
33821 | 144 ("pdf" |
57294
4e4ef6960726
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-589
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
145 (viewer . "gpdf %s") |
33821 | 146 (type . "application/pdf") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
147 ("print" . ,(concat "pdftops %s - | " mailcap-print-command)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
148 (test . (eq window-system 'x))) |
31717 | 149 ("pdf" |
57294
4e4ef6960726
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-589
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
150 (viewer . "xpdf %s") |
4e4ef6960726
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-589
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
151 (type . "application/pdf") |
4e4ef6960726
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-589
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
152 ("print" . ,(concat "pdftops %s - | " mailcap-print-command)) |
4e4ef6960726
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-589
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
153 (test . (eq window-system 'x))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
154 ("pdf" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
155 (viewer . ,(concat "pdftotext %s -")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
156 (type . "application/pdf") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
157 ("print" . ,(concat "pdftops %s - | " mailcap-print-command)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
158 ("copiousoutput")) |
31717 | 159 ("postscript" |
33821 | 160 (viewer . "gv -safer %s") |
161 (type . "application/postscript") | |
162 (test . window-system) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
163 ("print" . ,(concat mailcap-print-command " %s")) |
33821 | 164 ("needsx11")) |
31717 | 165 ("postscript" |
166 (viewer . "ghostview -dSAFER %s") | |
167 (type . "application/postscript") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
168 (test . (eq window-system 'x)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
169 ("print" . ,(concat mailcap-print-command " %s")) |
31717 | 170 ("needsx11")) |
171 ("postscript" | |
172 (viewer . "ps2ascii %s") | |
173 (type . "application/postscript") | |
174 (test . (not (getenv "DISPLAY"))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
175 ("print" . ,(concat mailcap-print-command " %s")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
176 ("copiousoutput")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
177 ("sieve" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
178 (viewer . sieve-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
179 (test . (fboundp 'sieve-mode)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
180 (type . "application/sieve")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
181 ("pgp-keys" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
182 (viewer . "gpg --import --interactive --verbose") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
183 (type . "application/pgp-keys") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
184 ("needsterminal"))) |
31717 | 185 ("audio" |
186 ("x-mpeg" | |
187 (viewer . "maplay %s") | |
188 (type . "audio/x-mpeg")) | |
189 (".*" | |
190 (viewer . "showaudio") | |
191 (type . "audio/*"))) | |
192 ("message" | |
193 ("rfc-*822" | |
194 (viewer . mm-view-message) | |
195 (test . (and (featurep 'gnus) | |
196 (gnus-alive-p))) | |
197 (type . "message/rfc822")) | |
198 ("rfc-*822" | |
199 (viewer . vm-mode) | |
200 (test . (fboundp 'vm-mode)) | |
201 (type . "message/rfc822")) | |
202 ("rfc-*822" | |
203 (viewer . w3-mode) | |
204 (test . (fboundp 'w3-mode)) | |
205 (type . "message/rfc822")) | |
206 ("rfc-*822" | |
207 (viewer . view-mode) | |
208 (type . "message/rfc822"))) | |
209 ("image" | |
210 ("x-xwd" | |
211 (viewer . "xwud -in %s") | |
212 (type . "image/x-xwd") | |
213 ("compose" . "xwd -frame > %s") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
214 (test . (eq window-system 'x)) |
31717 | 215 ("needsx11")) |
216 ("x11-dump" | |
217 (viewer . "xwud -in %s") | |
218 (type . "image/x-xwd") | |
219 ("compose" . "xwd -frame > %s") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
220 (test . (eq window-system 'x)) |
31717 | 221 ("needsx11")) |
222 ("windowdump" | |
223 (viewer . "xwud -in %s") | |
224 (type . "image/x-xwd") | |
225 ("compose" . "xwd -frame > %s") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
226 (test . (eq window-system 'x)) |
31717 | 227 ("needsx11")) |
228 (".*" | |
229 (viewer . "display %s") | |
230 (type . "image/*") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
231 (test . (eq window-system 'x)) |
31717 | 232 ("needsx11")) |
233 (".*" | |
234 (viewer . "ee %s") | |
235 (type . "image/*") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
236 (test . (eq window-system 'x)) |
31717 | 237 ("needsx11"))) |
238 ("text" | |
239 ("plain" | |
240 (viewer . w3-mode) | |
241 (test . (fboundp 'w3-mode)) | |
242 (type . "text/plain")) | |
243 ("plain" | |
244 (viewer . view-mode) | |
245 (test . (fboundp 'view-mode)) | |
246 (type . "text/plain")) | |
247 ("plain" | |
248 (viewer . fundamental-mode) | |
249 (type . "text/plain")) | |
250 ("enriched" | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
251 (viewer . enriched-decode) |
31717 | 252 (test . (fboundp 'enriched-decode)) |
253 (type . "text/enriched")) | |
254 ("html" | |
255 (viewer . mm-w3-prepare-buffer) | |
256 (test . (fboundp 'w3-prepare-buffer)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
257 (type . "text/html")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
258 ("dns" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
259 (viewer . dns-mode) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
260 (test . (fboundp 'dns-mode)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
261 (type . "text/dns"))) |
31717 | 262 ("video" |
263 ("mpeg" | |
264 (viewer . "mpeg_play %s") | |
265 (type . "video/mpeg") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
266 (test . (eq window-system 'x)) |
31717 | 267 ("needsx11"))) |
268 ("x-world" | |
269 ("x-vrml" | |
270 (viewer . "webspace -remote %s -URL %u") | |
271 (type . "x-world/x-vrml") | |
272 ("description" | |
273 "VRML document"))) | |
274 ("archive" | |
275 ("tar" | |
276 (viewer . tar-mode) | |
277 (type . "archive/tar") | |
278 (test . (fboundp 'tar-mode))))) | |
279 "The mailcap structure is an assoc list of assoc lists. | |
280 1st assoc list is keyed on the major content-type | |
281 2nd assoc list is keyed on the minor content-type (which can be a regexp) | |
282 | |
283 Which looks like: | |
284 ----------------- | |
285 ((\"application\" | |
286 (\"postscript\" . <info>)) | |
287 (\"text\" | |
288 (\"plain\" . <info>))) | |
289 | |
290 Where <info> is another assoc list of the various information | |
33821 | 291 related to the mailcap RFC 1524. This is keyed on the lowercase |
31717 | 292 attribute name (viewer, test, etc). This looks like: |
33821 | 293 ((viewer . VIEWERINFO) |
294 (test . TESTINFO) | |
295 (xxxx . \"STRING\") | |
296 FLAG) | |
31717 | 297 |
33821 | 298 Where VIEWERINFO specifies how the content-type is viewed. Can be |
31717 | 299 a string, in which case it is run through a shell, with |
300 appropriate parameters, or a symbol, in which case the symbol is | |
33821 | 301 `funcall'ed, with the buffer as an argument. |
31717 | 302 |
33821 | 303 TESTINFO is a test for the viewer's applicability, or nil. If nil, it |
304 means the viewer is always valid. If it is a Lisp function, it is | |
305 called with a list of items from any extra fields from the | |
306 Content-Type header as argument to return a boolean value for the | |
307 validity. Otherwise, if it is a non-function Lisp symbol or list | |
308 whose car is a symbol, it is `eval'led to yield the validity. If it | |
309 is a string or list of strings, it represents a shell command to run | |
310 to return a true or false shell value for the validity.") | |
55046
59e11b0793cf
(mailcap-mime-data): Mark as risky.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
311 (put 'mailcap-mime-data 'risky-local-variable t) |
31717 | 312 |
33821 | 313 (defcustom mailcap-download-directory nil |
34330
8b1375dbcbc6
(mailcap-download-directory): Fix :type.
Dave Love <fx@gnu.org>
parents:
33821
diff
changeset
|
314 "*Directory to which `mailcap-save-binary-file' downloads files by default. |
42206 | 315 nil means your home directory." |
34330
8b1375dbcbc6
(mailcap-download-directory): Fix :type.
Dave Love <fx@gnu.org>
parents:
33821
diff
changeset
|
316 :type '(choice (const :tag "Home directory" nil) |
8b1375dbcbc6
(mailcap-download-directory): Fix :type.
Dave Love <fx@gnu.org>
parents:
33821
diff
changeset
|
317 directory) |
33821 | 318 :group 'mailcap) |
31717 | 319 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
320 (defvar mailcap-poor-system-types |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
321 '(ms-dos ms-windows windows-nt win32 w32 mswindows) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
322 "Systems that don't have a Unix-like directory hierarchy.") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
323 |
31717 | 324 ;;; |
325 ;;; Utility functions | |
326 ;;; | |
327 | |
328 (defun mailcap-save-binary-file () | |
329 (goto-char (point-min)) | |
330 (unwind-protect | |
331 (let ((file (read-file-name | |
332 "Filename to save as: " | |
333 (or mailcap-download-directory "~/"))) | |
334 (require-final-newline nil)) | |
335 (write-region (point-min) (point-max) file)) | |
336 (kill-buffer (current-buffer)))) | |
337 | |
338 (defvar mailcap-maybe-eval-warning | |
339 "*** WARNING *** | |
340 | |
33821 | 341 This MIME part contains untrusted and possibly harmful content. |
31717 | 342 If you evaluate the Emacs Lisp code contained in it, a lot of nasty |
343 things can happen. Please examine the code very carefully before you | |
344 instruct Emacs to evaluate it. You can browse the buffer containing | |
345 the code using \\[scroll-other-window]. | |
346 | |
347 If you are unsure what to do, please answer \"no\"." | |
348 "Text of warning message displayed by `mailcap-maybe-eval'. | |
349 Make sure that this text consists only of few text lines. Otherwise, | |
350 Gnus might fail to display all of it.") | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
351 |
31717 | 352 (defun mailcap-maybe-eval () |
33821 | 353 "Maybe evaluate a buffer of Emacs Lisp code." |
31717 | 354 (let ((lisp-buffer (current-buffer))) |
355 (goto-char (point-min)) | |
356 (when | |
357 (save-window-excursion | |
358 (delete-other-windows) | |
359 (let ((buffer (get-buffer-create (generate-new-buffer-name | |
360 "*Warning*")))) | |
361 (unwind-protect | |
362 (with-current-buffer buffer | |
33821 | 363 (insert (substitute-command-keys |
31717 | 364 mailcap-maybe-eval-warning)) |
365 (goto-char (point-min)) | |
366 (display-buffer buffer) | |
367 (yes-or-no-p "This is potentially dangerous emacs-lisp code, evaluate it? ")) | |
368 (kill-buffer buffer)))) | |
369 (eval-buffer (current-buffer))) | |
370 (when (buffer-live-p lisp-buffer) | |
371 (with-current-buffer lisp-buffer | |
372 (emacs-lisp-mode))))) | |
373 | |
374 | |
375 ;;; | |
376 ;;; The mailcap parser | |
377 ;;; | |
378 | |
379 (defun mailcap-replace-regexp (regexp to-string) | |
380 ;; Quiet replace-regexp. | |
381 (goto-char (point-min)) | |
382 (while (re-search-forward regexp nil t) | |
383 (replace-match to-string t nil))) | |
384 | |
385 (defvar mailcap-parsed-p nil) | |
386 | |
387 (defun mailcap-parse-mailcaps (&optional path force) | |
388 "Parse out all the mailcaps specified in a path string PATH. | |
389 Components of PATH are separated by the `path-separator' character | |
390 appropriate for this system. If FORCE, re-parse even if already | |
391 parsed. If PATH is omitted, use the value of environment variable | |
392 MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus | |
393 /usr/local/etc/mailcap." | |
394 (interactive (list nil t)) | |
395 (when (or (not mailcap-parsed-p) | |
396 force) | |
397 (cond | |
398 (path nil) | |
399 ((getenv "MAILCAPS") (setq path (getenv "MAILCAPS"))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
400 ((memq system-type mailcap-poor-system-types) |
31717 | 401 (setq path '("~/.mailcap" "~/mail.cap" "~/etc/mail.cap"))) |
402 (t (setq path | |
403 ;; This is per RFC 1524, specifically | |
404 ;; with /usr before /usr/local. | |
405 '("~/.mailcap" "/etc/mailcap" "/usr/etc/mailcap" | |
406 "/usr/local/etc/mailcap")))) | |
407 (let ((fnames (reverse | |
408 (if (stringp path) | |
32989
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
409 (delete "" (split-string path path-separator)) |
31717 | 410 path))) |
411 fname) | |
412 (while fnames | |
413 (setq fname (car fnames)) | |
414 (if (and (file-readable-p fname) | |
415 (file-regular-p fname)) | |
416 (mailcap-parse-mailcap fname)) | |
417 (setq fnames (cdr fnames)))) | |
418 (setq mailcap-parsed-p t))) | |
419 | |
420 (defun mailcap-parse-mailcap (fname) | |
33821 | 421 "Parse out the mailcap file specified by FNAME." |
31717 | 422 (let (major ; The major mime type (image/audio/etc) |
423 minor ; The minor mime type (gif, basic, etc) | |
424 save-pos ; Misc saved positions used in parsing | |
425 viewer ; How to view this mime type | |
426 info ; Misc info about this mime type | |
427 ) | |
428 (with-temp-buffer | |
429 (insert-file-contents fname) | |
430 (set-syntax-table mailcap-parse-args-syntax-table) | |
431 (mailcap-replace-regexp "#.*" "") ; Remove all comments | |
432 (mailcap-replace-regexp "\\\\[ \t]*\n" " ") ; And collapse spaces | |
433 (mailcap-replace-regexp "\n+" "\n") ; And blank lines | |
434 (goto-char (point-max)) | |
435 (skip-chars-backward " \t\n") | |
436 (delete-region (point) (point-max)) | |
437 (while (not (bobp)) | |
438 (skip-chars-backward " \t\n") | |
439 (beginning-of-line) | |
440 (setq save-pos (point) | |
441 info nil) | |
442 (skip-chars-forward "^/; \t\n") | |
443 (downcase-region save-pos (point)) | |
444 (setq major (buffer-substring save-pos (point))) | |
445 (skip-chars-forward " \t") | |
446 (setq minor "") | |
447 (when (eq (char-after) ?/) | |
448 (forward-char) | |
449 (skip-chars-forward " \t") | |
450 (setq save-pos (point)) | |
451 (skip-chars-forward "^; \t\n") | |
452 (downcase-region save-pos (point)) | |
453 (setq minor | |
454 (cond | |
455 ((eq ?* (or (char-after save-pos) 0)) ".*") | |
456 ((= (point) save-pos) ".*") | |
457 (t (regexp-quote (buffer-substring save-pos (point))))))) | |
458 (skip-chars-forward " \t") | |
459 ;;; Got the major/minor chunks, now for the viewers/etc | |
460 ;;; The first item _must_ be a viewer, according to the | |
33821 | 461 ;;; RFC for mailcap files (#1524) |
31717 | 462 (setq viewer "") |
33821 | 463 (when (eq (char-after) ?\;) |
31717 | 464 (forward-char) |
465 (skip-chars-forward " \t") | |
466 (setq save-pos (point)) | |
467 (skip-chars-forward "^;\n") | |
468 ;; skip \; | |
469 (while (eq (char-before) ?\\) | |
470 (backward-delete-char 1) | |
471 (forward-char) | |
472 (skip-chars-forward "^;\n")) | |
473 (if (eq (or (char-after save-pos) 0) ?') | |
474 (setq viewer (progn | |
475 (narrow-to-region (1+ save-pos) (point)) | |
476 (goto-char (point-min)) | |
477 (prog1 | |
478 (read (current-buffer)) | |
479 (goto-char (point-max)) | |
480 (widen)))) | |
481 (setq viewer (buffer-substring save-pos (point))))) | |
482 (setq save-pos (point)) | |
483 (end-of-line) | |
33821 | 484 (unless (equal viewer "") |
31717 | 485 (setq info (nconc (list (cons 'viewer viewer) |
486 (cons 'type (concat major "/" | |
487 (if (string= minor ".*") | |
488 "*" minor)))) | |
489 (mailcap-parse-mailcap-extras save-pos (point)))) | |
490 (mailcap-mailcap-entry-passes-test info) | |
491 (mailcap-add-mailcap-entry major minor info)) | |
492 (beginning-of-line))))) | |
493 | |
494 (defun mailcap-parse-mailcap-extras (st nd) | |
33821 | 495 "Grab all the extra stuff from a mailcap entry." |
31717 | 496 (let ( |
497 name ; From name= | |
498 value ; its value | |
499 results ; Assoc list of results | |
500 name-pos ; Start of XXXX= position | |
501 val-pos ; Start of value position | |
502 done ; Found end of \'d ;s? | |
503 ) | |
504 (save-restriction | |
505 (narrow-to-region st nd) | |
506 (goto-char (point-min)) | |
507 (skip-chars-forward " \n\t;") | |
508 (while (not (eobp)) | |
509 (setq done nil) | |
510 (setq name-pos (point)) | |
511 (skip-chars-forward "^ \n\t=;") | |
512 (downcase-region name-pos (point)) | |
513 (setq name (buffer-substring name-pos (point))) | |
514 (skip-chars-forward " \t\n") | |
515 (if (not (eq (char-after (point)) ?=)) ; There is no value | |
516 (setq value t) | |
517 (skip-chars-forward " \t\n=") | |
518 (setq val-pos (point)) | |
519 (if (memq (char-after val-pos) '(?\" ?')) | |
520 (progn | |
521 (setq val-pos (1+ val-pos)) | |
522 (condition-case nil | |
523 (progn | |
524 (forward-sexp 1) | |
525 (backward-char 1)) | |
526 (error (goto-char (point-max))))) | |
527 (while (not done) | |
528 (skip-chars-forward "^;") | |
529 (if (eq (char-after (1- (point))) ?\\ ) | |
530 (progn | |
531 (subst-char-in-region (1- (point)) (point) ?\\ ? ) | |
532 (skip-chars-forward ";")) | |
533 (setq done t)))) | |
534 (setq value (buffer-substring val-pos (point)))) | |
68380
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
535 ;; `test' as symbol, others like "copiousoutput" and "needsx11" as |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
536 ;; strings |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
537 (setq results (cons (cons (if (string-equal name "test") |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
538 'test |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
539 name) |
e1843613ecb8
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14
Miles Bader <miles@gnu.org>
parents:
64754
diff
changeset
|
540 value) results)) |
31717 | 541 (skip-chars-forward " \";\n\t")) |
542 results))) | |
543 | |
544 (defun mailcap-mailcap-entry-passes-test (info) | |
78486
f0a07da7dd45
Replace `iff' in doc-strings and comments.
Glenn Morris <rgm@gnu.org>
parents:
78224
diff
changeset
|
545 "Return non-nil if mailcap entry INFO passes its test clause. |
33821 | 546 Also return non-nil if no test clause is present." |
547 (let ((test (assq 'test info)) ; The test clause | |
548 status) | |
31717 | 549 (setq status (and test (split-string (cdr test) " "))) |
550 (if (and (or (assoc "needsterm" info) | |
551 (assoc "needsterminal" info) | |
552 (assoc "needsx11" info)) | |
553 (not (getenv "DISPLAY"))) | |
554 (setq status nil) | |
555 (cond | |
556 ((and (equal (nth 0 status) "test") | |
557 (equal (nth 1 status) "-n") | |
558 (or (equal (nth 2 status) "$DISPLAY") | |
559 (equal (nth 2 status) "\"$DISPLAY\""))) | |
560 (setq status (if (getenv "DISPLAY") t nil))) | |
561 ((and (equal (nth 0 status) "test") | |
562 (equal (nth 1 status) "-z") | |
563 (or (equal (nth 2 status) "$DISPLAY") | |
564 (equal (nth 2 status) "\"$DISPLAY\""))) | |
565 (setq status (if (getenv "DISPLAY") nil t))) | |
566 (test nil) | |
567 (t nil))) | |
568 (and test (listp test) (setcdr test status)))) | |
569 | |
570 ;;; | |
571 ;;; The action routines. | |
572 ;;; | |
573 | |
574 (defun mailcap-possible-viewers (major minor) | |
33821 | 575 "Return a list of possible viewers from MAJOR for minor type MINOR." |
31717 | 576 (let ((exact '()) |
577 (wildcard '())) | |
578 (while major | |
579 (cond | |
580 ((equal (car (car major)) minor) | |
581 (setq exact (cons (cdr (car major)) exact))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
582 ((and minor (string-match (concat "^" (car (car major)) "$") minor)) |
31717 | 583 (setq wildcard (cons (cdr (car major)) wildcard)))) |
584 (setq major (cdr major))) | |
585 (nconc exact wildcard))) | |
586 | |
587 (defun mailcap-unescape-mime-test (test type-info) | |
588 (let (save-pos save-chr subst) | |
589 (cond | |
590 ((symbolp test) test) | |
591 ((and (listp test) (symbolp (car test))) test) | |
592 ((or (stringp test) | |
593 (and (listp test) (stringp (car test)) | |
594 (setq test (mapconcat 'identity test " ")))) | |
595 (with-temp-buffer | |
596 (insert test) | |
597 (goto-char (point-min)) | |
598 (while (not (eobp)) | |
599 (skip-chars-forward "^%") | |
600 (if (/= (- (point) | |
601 (progn (skip-chars-backward "\\\\") | |
602 (point))) | |
603 0) ; It is an escaped % | |
604 (progn | |
605 (delete-char 1) | |
606 (skip-chars-forward "%.")) | |
607 (setq save-pos (point)) | |
608 (skip-chars-forward "%") | |
609 (setq save-chr (char-after (point))) | |
33821 | 610 ;; Escapes: |
611 ;; %s: name of a file for the body data | |
612 ;; %t: content-type | |
613 ;; %{<parameter name}: value of parameter in mailcap entry | |
614 ;; %n: number of sub-parts for multipart content-type | |
615 ;; %F: a set of content-type/filename pairs for multiparts | |
31717 | 616 (cond |
617 ((null save-chr) nil) | |
618 ((= save-chr ?t) | |
619 (delete-region save-pos (progn (forward-char 1) (point))) | |
620 (insert (or (cdr (assq 'type type-info)) "\"\""))) | |
33821 | 621 ((memq save-chr '(?M ?n ?F)) |
31717 | 622 (delete-region save-pos (progn (forward-char 1) (point))) |
623 (insert "\"\"")) | |
624 ((= save-chr ?{) | |
625 (forward-char 1) | |
626 (skip-chars-forward "^}") | |
627 (downcase-region (+ 2 save-pos) (point)) | |
628 (setq subst (buffer-substring (+ 2 save-pos) (point))) | |
629 (delete-region save-pos (1+ (point))) | |
630 (insert (or (cdr (assoc subst type-info)) "\"\""))) | |
631 (t nil)))) | |
632 (buffer-string))) | |
33821 | 633 (t (error "Bad value to mailcap-unescape-mime-test: %s" test))))) |
31717 | 634 |
635 (defvar mailcap-viewer-test-cache nil) | |
636 | |
637 (defun mailcap-viewer-passes-test (viewer-info type-info) | |
78486
f0a07da7dd45
Replace `iff' in doc-strings and comments.
Glenn Morris <rgm@gnu.org>
parents:
78224
diff
changeset
|
638 "Return non-nil if viewer specified by VIEWER-INFO passes its test clause. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
639 Also return non-nil if it has no test clause. TYPE-INFO is an argument |
33821 | 640 to supply to the test." |
31717 | 641 (let* ((test-info (assq 'test viewer-info)) |
642 (test (cdr test-info)) | |
643 (otest test) | |
644 (viewer (cdr (assoc 'viewer viewer-info))) | |
645 (default-directory (expand-file-name "~/")) | |
646 status parsed-test cache result) | |
68521
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
647 (cond ((setq cache (assoc test mailcap-viewer-test-cache)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
648 (cadr cache)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
649 ((not test-info) t) ; No test clause |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
650 (t |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
651 (setq |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
652 result |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
653 (cond |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
654 ((not test) nil) ; Already failed test |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
655 ((eq test t) t) ; Already passed test |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
656 ((functionp test) ; Lisp function as test |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
657 (funcall test type-info)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
658 ((and (symbolp test) ; Lisp variable as test |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
659 (boundp test)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
660 (symbol-value test)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
661 ((and (listp test) ; List to be eval'd |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
662 (symbolp (car test))) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
663 (eval test)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
664 (t |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
665 (setq test (mailcap-unescape-mime-test test type-info) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
666 test (list shell-file-name nil nil nil |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
667 shell-command-switch test) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
668 status (apply 'call-process test)) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
669 (eq 0 status)))) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
670 (push (list otest result) mailcap-viewer-test-cache) |
04c2548593f7
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-33
Miles Bader <miles@gnu.org>
parents:
68380
diff
changeset
|
671 result)))) |
31717 | 672 |
673 (defun mailcap-add-mailcap-entry (major minor info) | |
674 (let ((old-major (assoc major mailcap-mime-data))) | |
675 (if (null old-major) ; New major area | |
676 (setq mailcap-mime-data | |
677 (cons (cons major (list (cons minor info))) | |
678 mailcap-mime-data)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
679 (let ((cur-minor (assoc minor old-major))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
680 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
681 ((or (null cur-minor) ; New minor area, or |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
682 (assq 'test info)) ; Has a test, insert at beginning |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
683 (setcdr old-major (cons (cons minor info) (cdr old-major)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
684 ((and (not (assq 'test info)) ; No test info, replace completely |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
685 (not (assq 'test cur-minor)) |
31717 | 686 (equal (assq 'viewer info) ; Keep alternative viewer |
687 (assq 'viewer cur-minor))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
688 (setcdr cur-minor info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
689 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
690 (setcdr old-major (cons (cons minor info) (cdr old-major)))))) |
31717 | 691 ))) |
692 | |
693 (defun mailcap-add (type viewer &optional test) | |
694 "Add VIEWER as a handler for TYPE. | |
695 If TEST is not given, it defaults to t." | |
696 (let ((tl (split-string type "/"))) | |
697 (when (or (not (car tl)) | |
698 (not (cadr tl))) | |
699 (error "%s is not a valid MIME type" type)) | |
700 (mailcap-add-mailcap-entry | |
701 (car tl) (cadr tl) | |
702 `((viewer . ,viewer) | |
703 (test . ,(if test test t)) | |
704 (type . ,type))))) | |
705 | |
706 ;;; | |
707 ;;; The main whabbo | |
708 ;;; | |
709 | |
710 (defun mailcap-viewer-lessp (x y) | |
78486
f0a07da7dd45
Replace `iff' in doc-strings and comments.
Glenn Morris <rgm@gnu.org>
parents:
78224
diff
changeset
|
711 "Return t if viewer X is more desirable than viewer Y." |
31717 | 712 (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) ""))) |
713 (y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) ""))) | |
714 (x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) "")))) | |
715 (y-lisp (not (stringp (or (cdr-safe (assq 'viewer y)) ""))))) | |
716 (cond | |
717 ((and x-wild (not y-wild)) | |
718 nil) | |
719 ((and (not x-wild) y-wild) | |
720 t) | |
721 ((and (not y-lisp) x-lisp) | |
722 t) | |
723 (t nil)))) | |
724 | |
725 (defun mailcap-mime-info (string &optional request) | |
726 "Get the MIME viewer command for STRING, return nil if none found. | |
727 Expects a complete content-type header line as its argument. | |
728 | |
729 Second argument REQUEST specifies what information to return. If it is | |
730 nil or the empty string, the viewer (second field of the mailcap | |
731 entry) will be returned. If it is a string, then the mailcap field | |
732 corresponding to that string will be returned (print, description, | |
733 whatever). If a number, then all the information for this specific | |
734 viewer is returned. If `all', then all possible viewers for | |
735 this type is returned." | |
736 (let ( | |
737 major ; Major encoding (text, etc) | |
738 minor ; Minor encoding (html, etc) | |
739 info ; Other info | |
740 save-pos ; Misc. position during parse | |
741 major-info ; (assoc major mailcap-mime-data) | |
742 minor-info ; (assoc minor major-info) | |
743 test ; current test proc. | |
744 viewers ; Possible viewers | |
745 passed ; Viewers that passed the test | |
746 viewer ; The one and only viewer | |
747 ctl) | |
748 (save-excursion | |
749 (setq ctl (mail-header-parse-content-type (or string "text/plain"))) | |
750 (setq major (split-string (car ctl) "/")) | |
751 (setq minor (cadr major) | |
752 major (car major)) | |
753 (when (setq major-info (cdr (assoc major mailcap-mime-data))) | |
754 (when (setq viewers (mailcap-possible-viewers major-info minor)) | |
755 (setq info (mapcar (lambda (a) (cons (symbol-name (car a)) | |
756 (cdr a))) | |
757 (cdr ctl))) | |
758 (while viewers | |
759 (if (mailcap-viewer-passes-test (car viewers) info) | |
760 (setq passed (cons (car viewers) passed))) | |
761 (setq viewers (cdr viewers))) | |
762 (setq passed (sort passed 'mailcap-viewer-lessp)) | |
763 (setq viewer (car passed)))) | |
764 (when (and (stringp (cdr (assq 'viewer viewer))) | |
765 passed) | |
766 (setq viewer (car passed))) | |
767 (cond | |
768 ((and (null viewer) (not (equal major "default")) request) | |
769 (mailcap-mime-info "default" request)) | |
770 ((or (null request) (equal request "")) | |
771 (mailcap-unescape-mime-test (cdr (assq 'viewer viewer)) info)) | |
772 ((stringp request) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
773 (mailcap-unescape-mime-test |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
774 (cdr-safe (assoc request viewer)) info)) |
31717 | 775 ((eq request 'all) |
776 passed) | |
777 (t | |
778 ;; MUST make a copy *sigh*, else we modify mailcap-mime-data | |
779 (setq viewer (copy-sequence viewer)) | |
780 (let ((view (assq 'viewer viewer)) | |
781 (test (assq 'test viewer))) | |
782 (if view (setcdr view (mailcap-unescape-mime-test (cdr view) info))) | |
783 (if test (setcdr test (mailcap-unescape-mime-test (cdr test) info)))) | |
784 viewer))))) | |
785 | |
786 ;;; | |
787 ;;; Experimental MIME-types parsing | |
788 ;;; | |
789 | |
790 (defvar mailcap-mime-extensions | |
33821 | 791 '(("" . "text/plain") |
792 (".abs" . "audio/x-mpeg") | |
793 (".aif" . "audio/aiff") | |
794 (".aifc" . "audio/aiff") | |
795 (".aiff" . "audio/aiff") | |
796 (".ano" . "application/x-annotator") | |
797 (".au" . "audio/ulaw") | |
798 (".avi" . "video/x-msvideo") | |
799 (".bcpio" . "application/x-bcpio") | |
800 (".bin" . "application/octet-stream") | |
801 (".cdf" . "application/x-netcdr") | |
802 (".cpio" . "application/x-cpio") | |
803 (".csh" . "application/x-csh") | |
804 (".css" . "text/css") | |
805 (".dvi" . "application/x-dvi") | |
806 (".diff" . "text/x-patch") | |
807 (".el" . "application/emacs-lisp") | |
808 (".eps" . "application/postscript") | |
809 (".etx" . "text/x-setext") | |
810 (".exe" . "application/octet-stream") | |
811 (".fax" . "image/x-fax") | |
812 (".gif" . "image/gif") | |
813 (".hdf" . "application/x-hdf") | |
814 (".hqx" . "application/mac-binhex40") | |
815 (".htm" . "text/html") | |
816 (".html" . "text/html") | |
817 (".icon" . "image/x-icon") | |
818 (".ief" . "image/ief") | |
819 (".jpg" . "image/jpeg") | |
820 (".macp" . "image/x-macpaint") | |
821 (".man" . "application/x-troff-man") | |
822 (".me" . "application/x-troff-me") | |
823 (".mif" . "application/mif") | |
824 (".mov" . "video/quicktime") | |
825 (".movie" . "video/x-sgi-movie") | |
826 (".mp2" . "audio/x-mpeg") | |
827 (".mp3" . "audio/x-mpeg") | |
828 (".mp2a" . "audio/x-mpeg2") | |
829 (".mpa" . "audio/x-mpeg") | |
830 (".mpa2" . "audio/x-mpeg2") | |
831 (".mpe" . "video/mpeg") | |
832 (".mpeg" . "video/mpeg") | |
833 (".mpega" . "audio/x-mpeg") | |
834 (".mpegv" . "video/mpeg") | |
835 (".mpg" . "video/mpeg") | |
836 (".mpv" . "video/mpeg") | |
837 (".ms" . "application/x-troff-ms") | |
838 (".nc" . "application/x-netcdf") | |
839 (".nc" . "application/x-netcdf") | |
840 (".oda" . "application/oda") | |
841 (".patch" . "text/x-patch") | |
842 (".pbm" . "image/x-portable-bitmap") | |
843 (".pdf" . "application/pdf") | |
844 (".pgm" . "image/portable-graymap") | |
845 (".pict" . "image/pict") | |
846 (".png" . "image/png") | |
847 (".pnm" . "image/x-portable-anymap") | |
848 (".ppm" . "image/portable-pixmap") | |
849 (".ps" . "application/postscript") | |
850 (".qt" . "video/quicktime") | |
851 (".ras" . "image/x-raster") | |
852 (".rgb" . "image/x-rgb") | |
853 (".rtf" . "application/rtf") | |
854 (".rtx" . "text/richtext") | |
855 (".sh" . "application/x-sh") | |
856 (".sit" . "application/x-stuffit") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
857 (".siv" . "application/sieve") |
33821 | 858 (".snd" . "audio/basic") |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78486
diff
changeset
|
859 (".soa" . "text/dns") |
33821 | 860 (".src" . "application/x-wais-source") |
861 (".tar" . "archive/tar") | |
862 (".tcl" . "application/x-tcl") | |
863 (".tex" . "application/x-tex") | |
864 (".texi" . "application/texinfo") | |
865 (".tga" . "image/x-targa") | |
866 (".tif" . "image/tiff") | |
867 (".tiff" . "image/tiff") | |
868 (".tr" . "application/x-troff") | |
869 (".troff" . "application/x-troff") | |
870 (".tsv" . "text/tab-separated-values") | |
871 (".txt" . "text/plain") | |
872 (".vbs" . "video/mpeg") | |
873 (".vox" . "audio/basic") | |
874 (".vrml" . "x-world/x-vrml") | |
875 (".wav" . "audio/x-wav") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
876 (".xls" . "application/vnd.ms-excel") |
33821 | 877 (".wrl" . "x-world/x-vrml") |
878 (".xbm" . "image/xbm") | |
879 (".xpm" . "image/xpm") | |
880 (".xwd" . "image/windowdump") | |
881 (".zip" . "application/zip") | |
882 (".ai" . "application/postscript") | |
883 (".jpe" . "image/jpeg") | |
884 (".jpeg" . "image/jpeg")) | |
885 "An alist of file extensions and corresponding MIME content-types. | |
886 This exists for you to customize the information in Lisp. It is | |
887 merged with values from mailcap files by `mailcap-parse-mimetypes'.") | |
31717 | 888 |
889 (defvar mailcap-mimetypes-parsed-p nil) | |
890 | |
891 (defun mailcap-parse-mimetypes (&optional path force) | |
33821 | 892 "Parse out all the mimetypes specified in a Unix-style path string PATH. |
31717 | 893 Components of PATH are separated by the `path-separator' character |
894 appropriate for this system. If PATH is omitted, use the value of | |
895 environment variable MIMETYPES if set; otherwise use a default path. | |
896 If FORCE, re-parse even if already parsed." | |
897 (interactive (list nil t)) | |
898 (when (or (not mailcap-mimetypes-parsed-p) | |
899 force) | |
900 (cond | |
901 (path nil) | |
902 ((getenv "MIMETYPES") (setq path (getenv "MIMETYPES"))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
55046
diff
changeset
|
903 ((memq system-type mailcap-poor-system-types) |
31717 | 904 (setq path '("~/mime.typ" "~/etc/mime.typ"))) |
905 (t (setq path | |
906 ;; mime.types seems to be the normal name, definitely so | |
907 ;; on current GNUish systems. The search order follows | |
908 ;; that for mailcap. | |
909 '("~/.mime.types" | |
910 "/etc/mime.types" | |
911 "/usr/etc/mime.types" | |
912 "/usr/local/etc/mime.types" | |
913 "/usr/local/www/conf/mime.types" | |
914 "~/.mime-types" | |
915 "/etc/mime-types" | |
916 "/usr/etc/mime-types" | |
917 "/usr/local/etc/mime-types" | |
918 "/usr/local/www/conf/mime-types")))) | |
919 (let ((fnames (reverse (if (stringp path) | |
32989
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
920 (delete "" (split-string path path-separator)) |
31717 | 921 path))) |
922 fname) | |
923 (while fnames | |
924 (setq fname (car fnames)) | |
925 (if (and (file-readable-p fname)) | |
926 (mailcap-parse-mimetype-file fname)) | |
927 (setq fnames (cdr fnames)))) | |
928 (setq mailcap-mimetypes-parsed-p t))) | |
929 | |
930 (defun mailcap-parse-mimetype-file (fname) | |
33821 | 931 "Parse out a mime-types file FNAME." |
31717 | 932 (let (type ; The MIME type for this line |
933 extns ; The extensions for this line | |
934 save-pos ; Misc. saved buffer positions | |
935 ) | |
936 (with-temp-buffer | |
937 (insert-file-contents fname) | |
938 (mailcap-replace-regexp "#.*" "") | |
939 (mailcap-replace-regexp "\n+" "\n") | |
940 (mailcap-replace-regexp "[ \t]+$" "") | |
941 (goto-char (point-max)) | |
942 (skip-chars-backward " \t\n") | |
943 (delete-region (point) (point-max)) | |
944 (goto-char (point-min)) | |
945 (while (not (eobp)) | |
946 (skip-chars-forward " \t\n") | |
947 (setq save-pos (point)) | |
948 (skip-chars-forward "^ \t\n") | |
949 (downcase-region save-pos (point)) | |
950 (setq type (buffer-substring save-pos (point))) | |
951 (while (not (eolp)) | |
952 (skip-chars-forward " \t") | |
953 (setq save-pos (point)) | |
954 (skip-chars-forward "^ \t\n") | |
955 (setq extns (cons (buffer-substring save-pos (point)) extns))) | |
956 (while extns | |
957 (setq mailcap-mime-extensions | |
958 (cons | |
959 (cons (if (= (string-to-char (car extns)) ?.) | |
960 (car extns) | |
961 (concat "." (car extns))) type) | |
962 mailcap-mime-extensions) | |
963 extns (cdr extns))))))) | |
964 | |
965 (defun mailcap-extension-to-mime (extn) | |
966 "Return the MIME content type of the file extensions EXTN." | |
967 (mailcap-parse-mimetypes) | |
968 (if (and (stringp extn) | |
969 (not (eq (string-to-char extn) ?.))) | |
970 (setq extn (concat "." extn))) | |
971 (cdr (assoc (downcase extn) mailcap-mime-extensions))) | |
972 | |
33821 | 973 ;; Unused? |
974 (defalias 'mailcap-command-p 'executable-find) | |
31717 | 975 |
976 (defun mailcap-mime-types () | |
977 "Return a list of MIME media types." | |
978 (mailcap-parse-mimetypes) | |
32989
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
979 (mm-delete-duplicates |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
980 (nconc |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
981 (mapcar 'cdr mailcap-mime-extensions) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
982 (apply |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
983 'nconc |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
984 (mapcar |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
985 (lambda (l) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
986 (delq nil |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
987 (mapcar |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
988 (lambda (m) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
989 (let ((type (cdr (assq 'type (cdr m))))) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
990 (if (equal (cadr (split-string type "/")) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
991 "*") |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
992 nil |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
993 type))) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
994 (cdr l)))) |
74484f2d629a
2000-10-27 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents:
31717
diff
changeset
|
995 mailcap-mime-data))))) |
31717 | 996 |
997 (provide 'mailcap) | |
998 | |
52401 | 999 ;;; arch-tag: 1fd4f9c9-c305-4d2e-9747-3a4d45baa0bd |
31717 | 1000 ;;; mailcap.el ends here |