2 ;;; gnus-sum-mime.el --- MIME extension for summary mode of Gnus
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
10 ;;; $Id: gnus-sum-mime.el,v 0.1 1996/08/06 12:00:53 morioka Exp $
11 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
13 ;;; This file is not part of GNU Emacs yet.
15 ;;; This program is free software; you can redistribute it and/or
16 ;;; modify it under the terms of the GNU General Public License as
17 ;;; published by the Free Software Foundation; either version 2, or
18 ;;; (at your option) any later version.
20 ;;; This program is distributed in the hope that it will be useful,
21 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 ;;; General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with This program. If not, write to the Free Software
27 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
32 (require 'gnus-art-mime)
38 (defun gnus-set-summary-default-charset ()
39 (decode-mime-charset-region
40 (point-min)(point-max)
42 (set-buffer gnus-summary-buffer)
43 (let ((rest gnus-newsgroup-default-charset-alist)
46 (while (setq cell (car rest))
47 (if (string-match (car cell) gnus-newsgroup-name)
50 (make-local-variable 'default-mime-charset)
51 (setq default-mime-charset (cdr cell))
53 (setq rest (cdr rest))
59 ;;; @ command functions
62 (defun gnus-summary-preview-mime-message (arg)
63 "MIME decode and play this message."
65 (let ((gnus-break-pages nil))
66 (gnus-summary-select-article t t)
68 (pop-to-buffer gnus-original-article-buffer t)
69 (let (buffer-read-only)
70 (if (text-property-any (point-min) (point-max) 'invisible t)
71 (remove-text-properties (point-min) (point-max)
72 gnus-hidden-properties)
74 (mime/viewer-mode nil nil nil gnus-original-article-buffer
78 (defun gnus-summary-scroll-down ()
79 "Scroll down one line current article."
81 (gnus-summary-scroll-up -1)
84 (define-key gnus-summary-mode-map "v"
85 (function gnus-summary-preview-mime-message))
86 (define-key gnus-summary-mode-map "\e\r"
87 (function gnus-summary-scroll-down))
93 (provide 'gnus-sum-mime)
95 ;;; gnus-sum-mime.el ends here