comparison lisp/tm/gnus-art-mime.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 0293115a14e9
children 54cc21c15cbb
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
1 ;;; gnus-art-mime.el --- MIME extension for article mode of Gnus 1 ;;; gnus-art-mime.el --- MIME extension for article mode of Gnus
2 2
3 ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
4 4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> 5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Created: 1996/8/6 6 ;; Created: 1996/8/6
7 ;; Version: 7 ;; Version:
8 ;; $Id: gnus-art-mime.el,v 1.3 1997/02/02 05:06:18 steve Exp $ 8 ;; $Id: gnus-art-mime.el,v 1.1.1.1 1996/12/18 22:43:38 steve Exp $
9 ;; Keywords: news, MIME, multimedia, multilingual, encoded-word 9 ;; Keywords: news, MIME, multimedia, multilingual, encoded-word
10 10
11 ;; This file is not part of GNU Emacs yet. 11 ;; This file is not part of GNU Emacs yet.
12 12
13 ;; This program is free software; you can redistribute it and/or 13 ;; This program is free software; you can redistribute it and/or
26 ;; Boston, MA 02111-1307, USA. 26 ;; Boston, MA 02111-1307, USA.
27 27
28 ;;; Code: 28 ;;; Code:
29 29
30 (require 'emu) 30 (require 'emu)
31 (require 'gnus-mime)
32 (require 'gnus-art) 31 (require 'gnus-art)
33 (require 'tm-view)
34 32
35 (autoload 'mime-eword/decode-region "tm-ew-d" 33 (autoload 'mime-eword/decode-region "tm-ew-d"
36 "Decode MIME encoded-words in region." t) 34 "Decode MIME encoded-words in region." t)
37 (autoload 'mime/decode-message-header "tm-ew-d" 35 (autoload 'mime/decode-message-header "tm-ew-d"
38 "Decode MIME encoded-words in message header." t) 36 "Decode MIME encoded-words in message header." t)
37 (autoload 'mime/viewer-mode "tm-view"
38 "Major mode for viewing MIME message." t)
39 39
40 40
41 ;;; @ encoded-word 41 ;;; @ encoded-word
42 ;;; 42 ;;;
43 43
44 ;;; `gnus-decode-rfc1522' of Gnus works only Q-encoded iso-8859-1 44 ;;; `gnus-decode-rfc1522' of Gnus works only Q-encoded iso-8859-1
45 ;;; encoded-words. In addition, it does not apply decoding rule of 45 ;;; encoded-words. In addition, it does not apply decoding rule of
46 ;;; RFC 1522 and it does not do unfolding. So gnus-mime defines own 46 ;;; RFC 1522 and it does not do unfolding. So gnus-mime defines own
47 ;;; function using tm-ew-d. 47 ;;; function using tm-ew-d.
48 48
49 (defun gnus-decode-encoded-word () 49 (defun gnus-decode-rfc1522 ()
50 (goto-char (point-min)) 50 (goto-char (point-min))
51 (if (re-search-forward "^[0-9]+\t" nil t) 51 (if (re-search-forward "^[0-9]+\t" nil t)
52 (progn 52 (progn
53 (goto-char (point-min)) 53 (goto-char (point-min))
54 ;; for XOVER 54 ;; for XOVER
60 'unfolding 'must-unfold) 60 'unfolding 'must-unfold)
61 ) 61 )
62 )) 62 ))
63 (mime-eword/decode-region (point-min)(point-max) t) 63 (mime-eword/decode-region (point-min)(point-max) t)
64 )) 64 ))
65
66 (defalias 'gnus-decode-rfc1522 'gnus-decode-encoded-word)
67
68 ;; In addition, latest RFC about encoded-word is RFC 2047. (^_^;
69 65
70 66
71 ;;; @ article filter 67 ;;; @ article filter
72 ;;; 68 ;;;
73 69