1 ;;; gnus-art-mime.el --- MIME extension for article mode of Gnus
3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;; $Id: gnus-art-mime.el,v 0.4 1996/08/12 09:00:14 morioka 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 This program. If not, write to the Free Software
25 ;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
32 (defun gnus-decode-rfc1522 ()
33 (goto-char (point-min))
34 (if (re-search-forward "^[0-9]+\t" nil t)
36 (goto-char (point-min))
38 (while (re-search-forward "^[0-9]+\t\\([^\t]+\\)\t" nil t)
39 (mime-eword/decode-region (match-beginning 1) (match-end 1)
40 'unfolding 'must-unfold)
41 (if (re-search-forward "[^\t]+" nil t)
42 (mime-eword/decode-region (match-beginning 0)(match-end 0)
43 'unfolding 'must-unfold)
46 (mime-eword/decode-region (point-min)(point-max) t)
53 (defun gnus-article-preview-mime-message ()
54 (make-local-variable 'tm:mother-button-dispatcher)
55 (setq tm:mother-button-dispatcher
56 (function gnus-article-push-button))
57 (let ((mime-viewer/ignored-field-regexp "^:$")
60 (set-buffer gnus-summary-buffer)
61 default-mime-charset))
63 (save-window-excursion
64 (mime/viewer-mode nil nil nil gnus-original-article-buffer
66 gnus-article-mode-map)
68 (run-hooks 'tm-gnus/article-prepare-hook)
71 (defun gnus-article-decode-encoded-word ()
72 (decode-mime-charset-region (point-min)(point-max)
74 (set-buffer gnus-summary-buffer)
75 default-mime-charset))
76 (mime/decode-message-header)
77 (run-hooks 'tm-gnus/article-prepare-hook)
91 (autoload 'tm-bbdb/update-record "tm-bbdb")
93 (defun tm-gnus/bbdb-setup ()
94 (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook)
96 (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
97 (add-hook 'gnus-article-display-hook 'tm-bbdb/update-record)
100 (add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
108 (provide 'gnus-art-mime)
110 ;;; gnus-art-mime.el ends here