annotate lisp/tm/gnus-mime.el @ 8:4b173ad71786 r19-15b5

Import from CVS: tag r19-15b5
author cvs
date Mon, 13 Aug 2007 08:47:35 +0200
parents b82b59fe008d
children 49a24b4fd526
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
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
3 ;; Copyright (C) 1996 Free Software Foundation, Inc.
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
8
4b173ad71786 Import from CVS: tag r19-15b5
cvs
parents: 4
diff changeset
7 ;; Version: $Revision: 1.2 $
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
8
4b173ad71786 Import from CVS: tag r19-15b5
cvs
parents: 4
diff changeset
36 "$Id: gnus-mime.el,v 1.2 1996/12/22 00:29:35 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 (autoload 'gnus-decode-rfc1522 "gnus-art-mime")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
68 (autoload 'gnus-article-preview-mime-message "gnus-art-mime")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
69 (autoload 'gnus-article-decode-encoded-word "gnus-art-mime")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
70 (autoload 'gnus-set-summary-default-charset "gnus-sum-mime")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
71 ;;(autoload 'gnus-get-newsgroup-headers "gnus-sum-mime")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
72 ;;(autoload 'gnus-get-newsgroup-headers-xover "gnus-sum-mime")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
73 (require 'gnus-charset)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
74
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
75
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
76 ;;; @ for tm-partial
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
77 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
78
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
79 (defun gnus-mime-partial-preview-function ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
80 (gnus-summary-preview-mime-message (gnus-summary-article-number))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
81 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
82
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
83 (call-after-loaded
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
84 'tm-partial
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
85 (function
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
86 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
87 (set-atype 'mime/content-decoding-condition
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
88 '((type . "message/partial")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
89 (method . mime-article/grab-message/partials)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
90 (major-mode . gnus-original-article-mode)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
91 (summary-buffer-exp . gnus-summary-buffer)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
92 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
93 (set-alist 'tm-partial/preview-article-method-alist
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
94 'gnus-original-article-mode
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
95 'gnus-mime-partial-preview-function)
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
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
99 ;;; @ end
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
100 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
101
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
102 (provide 'gnus-mime)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
103
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
104 (if gnus-is-red-gnus-or-later
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
105 (progn
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
106 (call-after-loaded 'gnus-art (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
107 (require 'gnus-art-mime)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
108 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
109 (call-after-loaded 'gnus-sum (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
110 (require 'gnus-sum-mime)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
111 ))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
112 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
113 (require 'gnus-mime-old)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
114 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
115
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
116 (run-hooks 'gnus-mime-load-hook)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
117
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
118 ;;; gnus-mime.el ends here