New branch "et-gnus-6_11" for experimental T-gnus.
[elisp/gnus.git-] / lisp / mmgnus.el
1 ;;; mmgnus.el --- MIME entity implementation for gnus-article
2
3 ;; Copyright (C) 1998 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Keywords: MIME, multimedia, mail, news
7
8 ;; This file is part of Chao-gnus.
9
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or (at
13 ;; your option) any later version.
14
15 ;; This program is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24
25 ;;; Code:
26
27 (require 'mmbuffer)
28
29 (luna-define-class mime-gnus-entity (mime-buffer-entity)
30                    (number
31                     subject from date id references chars lines xref))
32
33 (luna-define-internal-accessors 'mime-gnus-entity)
34
35 (luna-define-method initialize-instance ((entity mime-gnus-entity)
36                                          &rest init-args)
37   (apply (car (luna-class-find-functions
38                (luna-find-class 'standard-object)
39                'initialize-instance))
40          entity init-args)
41   )
42
43 ;; (luna-define-method mime-entity-fetch-field ((entity mime-gnus-entity)
44 ;;                                              field-name)
45 ;;   (or (funcall (car (luna-class-find-functions
46 ;;                      (luna-find-class 'mime-entity)
47 ;;                      'mime-entity-fetch-field))
48 ;;                entity field-name)
49 ;;       (with-current-buffer gnus-original-article-buffer
50 ;;         (let ((ret (std11-field-body field-name)))
51 ;;           (when ret
52 ;;             (or (symbolp field-name)
53 ;;                 (setq field-name
54 ;;                       (intern (capitalize (capitalize field-name)))))
55 ;;             (mime-entity-set-original-header-internal
56 ;;              entity
57 ;;              (put-alist field-name ret
58 ;;                         (mime-entity-original-header-internal entity)))
59 ;;             ret)))))
60
61 ;; (luna-define-method mime-entity-buffer ((entity mime-gnus-entity))
62 ;;   ;; (if (with-current-buffer gnus-summary-buffer
63 ;;   ;;       (eq gnus-current-article (mail-header-number entity)))
64 ;;   ;;     ...)
65 ;;   (unless (mime-buffer-entity-header-end-internal entity)
66 ;;     (set-buffer gnus-original-article-buffer)
67 ;;     (mime-buffer-entity-set-header-start-internal entity (point-min))
68 ;;     (mime-buffer-entity-set-body-end-internal entity (point-max))
69 ;;     (goto-char (point-min))
70 ;;     (if (re-search-forward "^$" nil t)
71 ;;         (progn
72 ;;           (mime-buffer-entity-set-header-end-internal entity (match-end 0))
73 ;;           (mime-buffer-entity-set-body-start-internal
74 ;;            entity
75 ;;            (if (= (mime-buffer-entity-header-end-internal entity)
76 ;;                   (mime-buffer-entity-body-end-internal entity))
77 ;;                (mime-buffer-entity-body-end-internal entity)
78 ;;              (1+ (mime-buffer-entity-header-end-internal entity))
79 ;;              ))
80 ;;           )
81 ;;       (mime-buffer-entity-set-header-end-internal entity (point-min))
82 ;;       (mime-buffer-entity-set-body-start-internal entity (point-min))
83 ;;       ))
84 ;;   gnus-original-article-buffer)
85
86
87 ;;; @ end
88 ;;;
89
90 (provide 'mmgnus)
91
92 ;;; mmgnus.el ends here