1 ;;; gnus-sum-mime.el --- MIME extension for summary mode of Gnus
3 ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;; $Id: gnus-sum-mime.el,v 1.1.1.1 1998-01-14 06:27:57 steve Exp $
9 ;; Keywords: news, MIME, multimedia, multilingual, encoded-word
11 ;; This file is not part of GNU Emacs yet.
13 ;; This program is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU General Public License as
15 ;; published by the Free Software Foundation; either version 2, or (at
16 ;; your option) any later version.
18 ;; This program is distributed in the hope that it will be useful, but
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ;; General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26 ;; Boston, MA 02111-1307, USA.
37 (defun gnus-set-summary-default-charset ()
39 (if (buffer-live-p gnus-summary-buffer)
41 (set-buffer gnus-summary-buffer)
42 (let ((ret (assoc-if (function
44 (string-match key gnus-newsgroup-name)
46 gnus-newsgroup-default-charset-alist)
50 (make-local-variable 'default-mime-charset)
51 (setq default-mime-charset (cdr ret))
55 default-mime-charset)))
56 (goto-char (point-min))
57 (while (< (point)(point-max))
58 (decode-mime-charset-region (point) (point-at-eol) charset)
60 (let (signal-error-on-buffer-boundary) ; for XEmacs
65 ;;; @ command functions
68 (defun gnus-summary-preview-mime-message (arg)
69 "MIME decode and play this message."
71 (let ((gnus-break-pages nil))
72 (gnus-summary-select-article t t)
74 (pop-to-buffer gnus-original-article-buffer t)
75 (let (buffer-read-only)
76 (if (text-property-any (point-min) (point-max) 'invisible t)
77 (remove-text-properties (point-min) (point-max)
78 gnus-hidden-properties)
80 (mime/viewer-mode nil nil nil gnus-original-article-buffer
84 (defun gnus-summary-scroll-down ()
85 "Scroll down one line current article."
87 (gnus-summary-scroll-up -1)
90 (define-key gnus-summary-mode-map "v"
91 (function gnus-summary-preview-mime-message))
92 (define-key gnus-summary-mode-map "\e\r"
93 (function gnus-summary-scroll-down))
99 (defun gnus-mime-partial-preview-function ()
100 (gnus-summary-preview-mime-message (gnus-summary-article-number))
107 (set-atype 'mime/content-decoding-condition
108 '((type . "message/partial")
109 (method . mime-article/grab-message/partials)
110 (major-mode . gnus-original-article-mode)
111 (summary-buffer-exp . gnus-summary-buffer)
113 (set-alist 'tm-partial/preview-article-method-alist
114 'gnus-original-article-mode
115 'gnus-mime-partial-preview-function)
122 (provide 'gnus-sum-mime)
124 ;;; gnus-sum-mime.el ends here