annotate lisp/tm/gnus-mime.el @ 16:0293115a14e9 r19-15b91

Import from CVS: tag r19-15b91
author cvs
date Mon, 13 Aug 2007 08:49:20 +0200
parents 49a24b4fd526
children 1917ad0d78d7
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 ;;; gnus-mime.el --- MIME extensions for Gnus
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
2
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
3 ;; Copyright (C) 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>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
6 ;; Created: 1996/8/6
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
7 ;; Version: $Revision: 1.4 $
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
8 ;; Keywords: news, MIME, multimedia, multilingual, encoded-word
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
9
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
10 ;; This file is not part of GNU Emacs yet.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
11
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
12 ;; This program is free software; you can redistribute it and/or
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
13 ;; modify it under the terms of the GNU General Public License as
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
14 ;; published by the Free Software Foundation; either version 2, or (at
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
15 ;; your option) any later version.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
16
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
17 ;; This program is distributed in the hope that it will be useful, but
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
20 ;; General Public License for more details.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
21
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
26
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
27 ;;; Code:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
28
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
29 (require 'tl-misc)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
30
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
31
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
32 ;;; @ version
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
33 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
34
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
35 (defconst gnus-mime-RCS-ID
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
36 "$Id: gnus-mime.el,v 1.4 1997/02/02 05:06:18 steve Exp $")
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
37
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
38 (defconst gnus-mime-version
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
39 (get-version-string gnus-mime-RCS-ID))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
40
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
41
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
42 ;;; @ variables
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
43 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
44
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
45 (defvar gnus-show-mime t
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
46 "*If non-nil, do mime processing of articles.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
47 The articles will simply be fed to the function given by
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
48 `gnus-show-mime-method'.")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
49
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
50 (defvar gnus-show-mime-method 'gnus-article-preview-mime-message
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
51 "*Function to process a MIME message.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
52 The function is called from the article buffer.")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
53
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
54 (defvar gnus-decode-encoded-word-method 'gnus-article-decode-encoded-word
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
55 "*Function to decode a MIME encoded-words.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
56 The function is called from the article buffer.")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
57
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
58 (defvar gnus-parse-headers-hook
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
59 '(gnus-set-summary-default-charset gnus-decode-rfc1522)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
60 "*A hook called before parsing the headers.")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
61
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
62
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
63 ;;; @ load
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
64 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
65
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
66 (require 'gnus)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
67 (require 'gnus-charset)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
68
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
69
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
70 ;;; @ for tm-partial
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
71 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
72
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
73 (defun gnus-mime-partial-preview-function ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
74 (gnus-summary-preview-mime-message (gnus-summary-article-number))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
75 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
76
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
77 (call-after-loaded
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
78 'tm-partial
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
79 (function
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
80 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
81 (set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
82 '((type . "message/partial")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
83 (method . mime-article/grab-message/partials)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
84 (major-mode . gnus-original-article-mode)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
85 (summary-buffer-exp . gnus-summary-buffer)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
86 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
87 (set-alist 'tm-partial/preview-article-method-alist
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
88 'gnus-original-article-mode
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
89 'gnus-mime-partial-preview-function)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
90 )))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
91
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
92
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
93 ;;; @ end
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 (provide 'gnus-mime)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
97
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
98 (or gnus-is-red-gnus-or-later
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
99 (require 'gnus-mime-old)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
100 )
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
101
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
102 (call-after-loaded 'gnus-art (lambda ()
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
103 (require 'gnus-art-mime)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
104 ))
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
105 (call-after-loaded 'gnus-sum (lambda ()
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
106 (require 'gnus-sum-mime)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 10
diff changeset
107 ))
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
108
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
109 (run-hooks 'gnus-mime-load-hook)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
110
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
111 ;;; gnus-mime.el ends here