tm 7.76.
authormorioka <morioka>
Mon, 9 Mar 1998 19:52:18 +0000 (19:52 +0000)
committermorioka <morioka>
Mon, 9 Mar 1998 19:52:18 +0000 (19:52 +0000)
ChangeLog
Makefile
gnus/ChangeLog
gnus/gnus-art-mime.el [new file with mode: 0644]
gnus/gnus-charset.el [new file with mode: 0644]
gnus/gnus-mime.el [new file with mode: 0644]
gnus/gnus-sum-mime.el [new file with mode: 0644]
gnus/mk-tgnus
gnus/tm-gnus.el
tm-edit.el
tm-setup.el

index aa4f8a0..faef459 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Tue Aug  6 12:29:11 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tl: Version 7.44 was released.
+       * tm: Version 7.76
+       * tm/gnus: gnus-mime Version 0.2 was released.
+
+       * tm-edit.el (mime-editor/encrypt-pgp-elkins): Use function
+       `rfc822/get-field-bodies'.
+
+Tue Aug  6 12:12:53 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-setup.el (tm-setup/load-GNUS): New function.
+       (tm-setup/load-gnus): New function.
+
+\f
 Thu Aug  1 06:42:04 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
        * tl: Version 7.43.2 was released.
index c72beee..859af92 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/tl-els \
 
 FILES  = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
 
-TARFILE = tm7.75.tar.gz
+TARFILE = tm7.76.tar.gz
 
 elc:
        $(EMACS) $(FLAGS) -l inst-tm -f compile-tm
index d7a2f5c..0537e8c 100644 (file)
@@ -1,3 +1,27 @@
+Tue Aug  6 12:10:47 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/gnus: gnus-mime Version 0.2 was released.
+
+       * mk-tgnus: setting for gnus-mime.
+
+Tue Aug  6 12:09:13 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-gnus.el: Setting for Gnus were cut off.
+
+Tue Aug  6 12:05:37 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * gnus-mime.el (gnus-mime-RCS-ID, gnus-mime-version): New
+       constant.
+
+       * gnus-mime.el, gnus-charset.el, gnus-sum-mime.el,
+       gnus-art-mime.el: New module; split from tm-gnus5.el; tm-gnus5.el
+       was abolished.
+
+Thu Aug  1 11:44:22 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-gnus.el: check (featurep 'gnus-load) for Red Gnus.
+
+\f
 Wed Jul 24 10:04:54 1996  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
        * tm/gnus: Version 7.79 was released.
diff --git a/gnus/gnus-art-mime.el b/gnus/gnus-art-mime.el
new file mode 100644 (file)
index 0000000..627fa0c
--- /dev/null
@@ -0,0 +1,108 @@
+;;;
+;;; gnus-art-mime.el --- MIME extension for article mode of Gnus
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Created: 1996/8/6
+;;; Version: $Id: gnus-art-mime.el,v 0.1 1996/08/06 12:00:10 morioka Exp $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is not part of GNU Emacs yet.
+;;;
+;;; This program is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation; either version 2, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with This program.  If not, write to the Free Software
+;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+;;; Code:
+
+(require 'tm-view)
+(require 'gnus-art)
+
+(defun gnus-decode-rfc1522 ()
+  (goto-char (point-min))
+  (if (re-search-forward "^[0-9]+\t" nil t)
+      (progn
+       (goto-char (point-min))
+       ;; for XOVER
+       (while (re-search-forward "^[0-9]+\t\\([^\t]+\\)\t" nil t)
+         (mime-eword/decode-region (match-beginning 1) (match-end 1))
+         (if (re-search-forward "[^\t]+" nil t)
+             (mime-eword/decode-region (match-beginning 0)(match-end 0))
+           )
+         ))
+    (mime-eword/decode-region (point-min)(point-max) t)
+    ))
+
+
+;;; @ article filter
+;;;
+
+(defun gnus-article-preview-mime-message ()
+  (make-local-variable 'tm:mother-button-dispatcher)
+  (setq tm:mother-button-dispatcher
+       (function gnus-article-push-button))
+  (let ((mime-viewer/ignored-field-regexp "^:$")
+       (default-mime-charset
+         (save-excursion
+           (set-buffer gnus-summary-buffer)
+           default-mime-charset))
+       )
+    (mime/viewer-mode nil nil nil gnus-original-article-buffer
+                     gnus-article-buffer
+                     gnus-article-mode-map)
+    )
+  (run-hooks 'tm-gnus/article-prepare-hook)
+  )
+
+(defun gnus-article-decode-encoded-word ()
+  (decode-mime-charset-region (point-min)(point-max)
+                             (save-excursion
+                               (set-buffer gnus-summary-buffer)
+                               default-mime-charset))
+  (mime/decode-message-header)
+  (run-hooks 'tm-gnus/article-prepare-hook)
+  )
+
+
+;;; @ for BBDB
+;;;
+
+(call-after-loaded
+ 'bbdb
+ (function
+  (lambda ()
+    (require 'tm-bbdb)
+    )))
+
+(autoload 'tm-bbdb/update-record "tm-bbdb")
+
+(defun tm-gnus/bbdb-setup ()
+  (if (memq 'bbdb/gnus-update-record gnus-article-prepare-hook)
+      (progn
+       (remove-hook 'gnus-article-prepare-hook 'bbdb/gnus-update-record)
+       (add-hook 'gnus-article-display-hook 'tm-bbdb/update-record)
+       )))
+
+(add-hook 'gnus-startup-hook 'tm-gnus/bbdb-setup t)
+
+(tm-gnus/bbdb-setup)
+
+
+;;; @ end
+;;;
+
+(provide 'gnus-art-mime)
+
+;;; gnus-art-mime.el ends here
diff --git a/gnus/gnus-charset.el b/gnus/gnus-charset.el
new file mode 100644 (file)
index 0000000..a0e0f01
--- /dev/null
@@ -0,0 +1,114 @@
+;;;
+;;; gnus-charset.el --- MIME charset extension for Gnus
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Created: 1996/8/6
+;;; Version:
+;;;    $Id: gnus-charset.el,v 0.1 1996/08/06 12:07:28 morioka Exp $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is not part of GNU Emacs yet.
+;;;
+;;; This program is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation; either version 2, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with This program.  If not, write to the Free Software
+;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+;;; Code:
+
+(defvar running-xemacs (string-match "XEmacs" emacs-version))
+(defvar running-xemacs-20 (and running-xemacs
+                              (= emacs-major-version 20)))
+
+
+;;; @ newsgroup default charset
+;;;
+
+(defvar gnus-newsgroup-default-charset-alist nil)
+
+(defun gnus-set-newsgroup-default-charset (newsgroup charset)
+  "Set CHARSET for the NEWSGROUP as default MIME charset."
+  (set-alist 'gnus-newsgroup-default-charset-alist
+            (concat "^" (regexp-quote newsgroup) "\\($\\|\\.\\)")
+            charset))
+
+
+;;; @ for mule (Multilingual support)
+;;;
+
+(cond
+ ((featurep 'mule)
+  (cond ((boundp 'MULE) ; for MULE 1.* and 2.*.
+        (defun gnus-set-nntp-coding-system ()
+          (define-service-coding-system gnus-nntp-service nil *noconv*)
+          )
+        (add-hook 'gnus-open-server-hook 'gnus-set-nntp-coding-system)
+        )
+       (running-xemacs-20
+        (or (boundp '*noconv*)
+            (defconst *noconv* 'noconv)
+            )))
+  (call-after-loaded
+   'nnheader
+   (lambda ()
+     (defun nnheader-find-file-noselect (filename &optional nowarn rawfile)
+       (let ((file-coding-system-for-read *noconv*))
+        (find-file-noselect filename nowarn rawfile)
+        ))
+     (defun nnheader-insert-file-contents-literally
+       (filename &optional visit beg end replace)
+       (let ((file-coding-system-for-read *noconv*))
+        (insert-file-contents-literally filename visit beg end replace)
+        ))
+     ))
+  (call-after-loaded
+   'nnmail
+   (lambda ()
+     (defun nnmail-find-file (file)
+       "Insert FILE in server buffer safely. [tm-gnus5.el]"
+       (set-buffer nntp-server-buffer)
+       (erase-buffer)
+       (let ((format-alist nil)
+             (after-insert-file-functions   ; for jam-code-guess
+              (if (memq 'jam-code-guess-after-insert-file-function
+                        after-insert-file-functions)
+                  '(jam-code-guess-after-insert-file-function)))
+            (file-coding-system-for-read *noconv*))
+        (condition-case ()
+            (progn (insert-file-contents file) t)
+          (file-error nil))))
+     ))
+  (defun gnus-prepare-save-mail-function ()
+    (setq file-coding-system *noconv*)
+    )
+  (add-hook 'nnmail-prepare-save-mail-hook
+           'gnus-prepare-save-mail-function)
+  
+  (gnus-set-newsgroup-default-charset "alt.chinese"            'hz)
+  (gnus-set-newsgroup-default-charset "alt.chinese.text.big5"  'big5)
+  (gnus-set-newsgroup-default-charset "tw"                     'big5)
+  (gnus-set-newsgroup-default-charset "hk"                     'big5)
+  (gnus-set-newsgroup-default-charset "hkstar"                 'big5)
+  (gnus-set-newsgroup-default-charset "han"                            'euc-kr)
+  (gnus-set-newsgroup-default-charset "relcom"                 'koi8-r)
+  ))
+
+
+;;; @ end
+;;;
+
+(provide 'gnus-charset)
+
+;;; gnus-charset.el ends here
diff --git a/gnus/gnus-mime.el b/gnus/gnus-mime.el
new file mode 100644 (file)
index 0000000..596f5c6
--- /dev/null
@@ -0,0 +1,234 @@
+;;;
+;;; gnus-mime.el --- MIME extensions for Gnus
+;;;
+;;; Copyright (C) 1996 Free Software Foundation, Inc.
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Created: 1996/8/6
+;;; Version: $Revision: 0.2 $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is not part of GNU Emacs yet.
+;;;
+;;; This program is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation; either version 2, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with This program.  If not, write to the Free Software
+;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+;;; Code:
+
+(defun call-after-loaded (module func &optional hook-name)
+  "If MODULE is provided, then FUNC is called.
+Otherwise func is set to MODULE-load-hook.
+If optional argument HOOK-NAME is specified,
+it is used as hook to set. [gnus-mime.el]"
+  (if (featurep module)
+      (funcall func)
+    (progn
+      (if (null hook-name)
+         (setq hook-name
+               (intern (concat (symbol-name module) "-load-hook")))
+       )
+      (add-hook hook-name func)
+      )))
+
+(defun get-version-string (id)
+  "Return a version-string from RCS ID. [gnus-mime.el]"
+  (and (string-match ",v \\([0-9][0-9.][0-9.]+\\)" id)
+       (substring id (match-beginning 1)(match-end 1))
+       ))
+
+
+;;; @ version
+;;;
+
+(defconst gnus-mime-RCS-ID
+  "$Id: gnus-mime.el,v 0.2 1996/08/06 12:05:37 morioka Exp $")
+
+(defconst gnus-mime-version
+  (get-version-string gnus-mime-RCS-ID))
+
+
+;;; @ variables
+;;;
+
+(defvar gnus-show-mime t
+  "*If non-nil, do mime processing of articles.
+The articles will simply be fed to the function given by
+`gnus-show-mime-method'.")
+
+(defvar gnus-show-mime-method 'gnus-article-preview-mime-message
+  "*Function to process a MIME message.
+The function is called from the article buffer.")
+
+(defvar gnus-decode-encoded-word-method 'gnus-article-decode-encoded-word
+  "*Function to decode a MIME encoded-words.
+The function is called from the article buffer.")
+
+(defvar gnus-parse-headers-hook
+  '(gnus-set-summary-default-charset gnus-decode-rfc1522)
+  "*A hook called before parsing the headers.")
+
+
+;;; @ load
+;;;
+
+(require 'gnus)
+(autoload 'gnus-decode-rfc1522               "gnus-art-mime")
+(autoload 'gnus-article-preview-mime-message "gnus-art-mime")
+(autoload 'gnus-article-decode-encoded-word  "gnus-art-mime")
+(autoload 'gnus-set-summary-default-charset  "gnus-sum-mime")
+(require 'gnus-charset)
+
+
+;;; @ for tm-view
+;;;
+
+(defun gnus-content-header-filter ()
+  (goto-char (point-min))
+  (mime-preview/cut-header)
+  (decode-mime-charset-region (point-min)(point-max) default-mime-charset)
+  (mime/decode-message-header)
+  )
+
+(set-alist 'mime-viewer/content-header-filter-alist
+          'gnus-original-article-mode
+          (function gnus-content-header-filter))
+
+
+(set-alist 'mime-viewer/code-converter-alist
+          'gnus-original-article-mode
+          (function mime-charset/decode-buffer))
+
+
+(defun mime-viewer/quitting-method-for-gnus ()
+  (if (not gnus-show-mime)
+      (mime-viewer/kill-buffer))
+  (delete-other-windows)
+  (gnus-article-show-summary)
+  (if (or (not gnus-show-mime)
+         (null gnus-have-all-headers))
+      (gnus-summary-select-article nil t)
+    ))
+
+(set-alist 'mime-viewer/quitting-method-alist
+          'gnus-original-article-mode
+          (function mime-viewer/quitting-method-for-gnus))
+(set-alist 'mime-viewer/show-summary-method
+          'gnus-original-article-mode
+          (function mime-viewer/quitting-method-for-gnus))
+
+
+;;; @ for tm-partial
+;;;
+
+(defun gnus-mime-partial-preview-function ()
+  (gnus-summary-preview-mime-message (gnus-summary-article-number))
+  )
+
+(call-after-loaded
+ 'tm-partial
+ (function
+  (lambda ()
+    (set-atype 'mime/content-decoding-condition
+              '((type . "message/partial")
+                (method . mime-article/grab-message/partials)
+                (major-mode . gnus-original-article-mode)
+                (summary-buffer-exp . gnus-summary-buffer)
+                ))
+    (set-alist 'tm-partial/preview-article-method-alist
+              'gnus-original-article-mode
+              'gnus-mime-partial-preview-function)
+    )))
+
+
+;;; @ for tm-edit
+;;;
+
+;; suggested by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;     1995/11/08 (c.f. [tm ML:1067])
+(defun tm-gnus/insert-article (&optional message)
+  (interactive)
+  (let ((message-cite-function 'mime-editor/inserted-message-filter)
+        (message-reply-buffer gnus-original-article-buffer)
+       )
+    (message-yank-original nil)
+    ))
+
+;;; modified by Steven L. Baur <steve@miranova.com>
+;;;    1995/12/6 (c.f. [tm-en:209])
+(defun mime-editor/attach-to-news-reply-menu ()
+  "Arrange to attach MIME editor's popup menu to VM's"
+  (if (boundp 'news-reply-menu)
+      (progn
+       (setq news-reply-menu (append news-reply-menu
+                                     '("---")
+                                     mime-editor/popup-menu-for-xemacs))
+       (remove-hook 'news-setup-hook
+                    'mime-editor/attach-to-news-reply-menu)
+       )))
+
+(call-after-loaded
+ 'tm-edit
+ (function
+  (lambda ()
+    (set-alist 'mime-editor/message-inserter-alist
+              'message-mode (function tm-gnus/insert-article))
+    (if (string-match "XEmacs\\|Lucid" emacs-version)
+       (add-hook 'news-setup-hook 'mime-editor/attach-to-news-reply-menu)
+      )
+
+    (set-alist 'mime-editor/split-message-sender-alist
+              'message-mode
+              (lambda ()
+                (interactive)
+                (let (message-send-hook
+                      message-sent-message-via)
+                  (message-send)
+                  )))
+    )))
+
+
+;;; @ end
+;;;
+
+(provide 'gnus-mime)
+
+(or (featurep 'gnus-load)
+    (progn
+      ;; for Gnus 5.0 .. 5.3
+      (provide 'gnus-sum)
+      (provide 'gnus-art)
+      
+      (or (boundp 'gnus-original-article-buffer)
+         (progn
+           ;; for Gnus 5.0.* and 5.1
+           (defvar gnus-original-article-buffer " *Original Article*")
+           
+           (defun gnus-article-setup-original-article-buffer ()
+             (save-excursion
+               (set-buffer (get-buffer-create gnus-original-article-buffer))
+               (erase-buffer)
+               (insert-buffer gnus-article-buffer)
+               (setq major-mode 'gnus-original-article-mode)
+               ))
+           
+           (add-hook 'gnus-article-prepare-hook
+                     'gnus-article-setup-original-article-buffer)
+           
+           (setq gnus-strict-mime nil)
+           ))
+      ))
+
+(run-hooks 'gnus-mime-load-hook)
+
+;;; gnus-mime.el ends here
diff --git a/gnus/gnus-sum-mime.el b/gnus/gnus-sum-mime.el
new file mode 100644 (file)
index 0000000..1da1760
--- /dev/null
@@ -0,0 +1,95 @@
+;;;
+;;; gnus-sum-mime.el --- MIME extension for summary mode of Gnus
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Created: 1996/8/6
+;;; Version:
+;;;    $Id: gnus-sum-mime.el,v 0.1 1996/08/06 12:00:53 morioka Exp $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is not part of GNU Emacs yet.
+;;;
+;;; This program is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation; either version 2, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with This program.  If not, write to the Free Software
+;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;;
+;;; Code:
+
+(require 'gnus-mime)
+(require 'gnus-art-mime)
+
+
+;;; @ summary filter
+;;;
+
+(defun gnus-set-summary-default-charset ()
+  (decode-mime-charset-region
+   (point-min)(point-max)
+   (save-excursion
+     (set-buffer gnus-summary-buffer)
+     (let ((rest gnus-newsgroup-default-charset-alist)
+          cell)
+       (catch 'tag
+        (while (setq cell (car rest))
+          (if (string-match (car cell) gnus-newsgroup-name)
+              (throw 'tag
+                     (progn
+                       (make-local-variable 'default-mime-charset)
+                       (setq default-mime-charset (cdr cell))
+                       )))
+          (setq rest (cdr rest))
+          )))
+     default-mime-charset)
+   ))
+
+
+;;; @ command functions
+;;;
+
+(defun gnus-summary-preview-mime-message (arg)
+  "MIME decode and play this message."
+  (interactive "P")
+  (let ((gnus-break-pages nil))
+    (gnus-summary-select-article t t)
+    )
+  (pop-to-buffer gnus-original-article-buffer t)
+  (let (buffer-read-only)
+    (if (text-property-any (point-min) (point-max) 'invisible t)
+       (remove-text-properties (point-min) (point-max)
+                               gnus-hidden-properties)
+      ))
+  (mime/viewer-mode nil nil nil gnus-original-article-buffer
+                   gnus-article-buffer)
+  )
+
+(defun gnus-summary-scroll-down ()
+  "Scroll down one line current article."
+  (interactive)
+  (gnus-summary-scroll-up -1)
+  )
+
+(define-key gnus-summary-mode-map "v"
+  (function gnus-summary-preview-mime-message))
+(define-key gnus-summary-mode-map "\e\r"
+  (function gnus-summary-scroll-down))
+
+
+;;; @ end
+;;;
+
+(provide 'gnus-sum-mime)
+
+;;; gnus-sum-mime.el ends here
index 67150cc..26f5de6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Emacs-Lisp-*-
 ;;;
-;;; $Id: mk-tgnus,v 5.0 1996/06/27 15:01:37 morioka Exp $
+;;; $Id: mk-tgnus,v 6.0 1996/08/06 12:10:47 morioka Exp $
 ;;;
 
 (setq load-path
   (require 'tm-partial)
   (require 'tm-edit)
   (princ (format "%s\n" gnus-version))
-  (cond ((boundp 'gnus-original-article-buffer)
-        (require 'tm-gnus)
-        (byte-compile-file "tm-gnus5.el")
-        )
-       ((string-match "Gnus v5\\|September Gnus" gnus-version)
-        (require 'tm-gnus)
-        (byte-compile-file "tm-gnus4.el")
+  (cond ((boundp 'gnus-load-hook)
+        (byte-compile-file "gnus-mime.el")
+        (byte-compile-file "gnus-charset.el")
+        (byte-compile-file "gnus-sum-mime.el")
+        (byte-compile-file "gnus-art-mime.el")
         )
        ((string-match "GNUS 4" gnus-version)
         (require 'tm-gnus)
                              ;;"tm-gnus.elc"
                              "tm-gnus3.elc" "tm-gnus4.elc")
           )
-         ((and running-emacs-19 (<= emacs-minor-version 29))
+         ((or (and running-emacs-19 (<= emacs-minor-version 29))
+              (and running-xemacs-19 (<= emacs-minor-version 13)))
           (install-el-files path
-                            "tm-gnus.el" "tm-gnus4.el" "tm-gd3.el")
+                            "tm-gnus.el" "tm-gnus4.el" "tm-gd3.el"
+                            "gnus-mime.el" "gnus-charset.el"
+                            "gnus-sum-mime.el" "gnus-art-mime.el")
           (install-elc-files path
                              ;;"tm-gnus.elc"
-                             "tm-gnus4.elc")
-          )
-         ((and running-xemacs-19 (<= emacs-minor-version 13))
-          (install-el-files path
-                            "tm-gnus.el"
-                            "tm-gnus5.el" "tm-gnus4.el"
-                            "tm-gd3.el")
-          (install-elc-files path
-                             ;;"tm-gnus.elc"
-                             "tm-gnus5.elc" "tm-gnus4.elc")
-          )
-         ((and running-emacs-19 (<= emacs-minor-version 31))
-          (install-el-files path
-                            "tm-gnus.el"
-                            "tm-gnus5.el" "tm-gnus4.el")
-          (install-elc-files path
-                             ;;"tm-gnus.elc"
-                             "tm-gnus5.elc" "tm-gnus4.elc")
+                             "tm-gnus4.elc"
+                             "gnus-mime.elc" "gnus-charset.elc"
+                             "gnus-sum-mime.elc" "gnus-art-mime.elc")
           )
          (t
-          (install-el-files path "tm-gnus.el" "tm-gnus5.el")
+          (install-el-files path
+                            "gnus-mime.el" "gnus-charset.el"
+                            "gnus-sum-mime.el" "gnus-art-mime.el")
           (install-elc-files path
-                             ;;"tm-gnus.elc"
-                             "tm-gnus5.elc")
+                             "gnus-mime.elc" "gnus-charset.elc"
+                             "gnus-sum-mime.elc" "gnus-art-mime.elc")
           ))
     (setq command-line-args-left (cdr command-line-args-left))
     ))
index 34a0891..9a7c9df 100644 (file)
@@ -5,11 +5,12 @@
 ;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; modified by KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>
+;;; modified by Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;;         and Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
 ;;; Created: 1993/11/20 (obsolete mol's gnus-mime.el)
 ;;; Version:
-;;;    $Id: tm-gnus.el,v 7.22 1996/06/27 14:43:48 morioka Exp $
+;;;    $Id: tm-gnus.el,v 7.24 1996/08/06 12:09:13 morioka Exp $
 ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -28,6 +29,8 @@
 ;;; along with This program.  If not, write to the Free Software
 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 ;;;
+;;; Commentary: Notice that this module is only for GNUS, not for Gnus.
+;;;
 ;;; Code:
 
 (require 'gnus)
 ;;; @ set up
 ;;;
 
-(cond ((boundp 'gnus-original-article-buffer)
-       ;; for Gnus 5.2 or later
-       (require 'tm-gnus5)
-       )
-      ((or (string-match
-           "^\\((ding) Gnus\\|Gnus v5\\|September Gnus\\)" gnus-version)
-          (fboundp 'mail-header-from))
-       ;; for Gnus 5.0 .. 5.1.*
-       (require 'tm-gnus4)
-       (cond ((not (boundp 'nnheader-encoded-words-decoding))
-             (require 'tm-ew-d)
-             (defun tm-gnus/decode-summary-from-and-subjects ()
-               (mapcar (lambda (header)
-                         (let ((from (mail-header-from header))
-                               (subj (mail-header-subject header))
-                               )
-                           (mail-header-set-from
-                            header
-                            (if from
-                                (mime-eword/decode-string from)
-                              ""))
-                           (mail-header-set-subject
-                            header
-                            (if subj
-                                (mime-eword/decode-string subj)
-                              ""))
-                           ))
-                       gnus-newsgroup-headers))
-             (add-hook 'gnus-select-group-hook
-                       (function tm-gnus/decode-summary-from-and-subjects))
-             ))
-       )
-      ((fboundp 'gnus-article-prepare)
+(cond ((fboundp 'gnus-article-prepare)
        ;; for GNUS 3.15 .. 4.*
        (require 'tm-gd3)
        (require 'tm-gnus4)
index 5e2eff6..5e9643f 100644 (file)
@@ -8,7 +8,7 @@
 ;;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1994/08/21 renamed from mime.el
-;;; Version: $Revision: 7.75 $
+;;; Version: $Revision: 7.76 $
 ;;; Keywords: mail, news, MIME, multimedia, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
 ;;;
 
 (defconst mime-editor/RCS-ID
-  "$Id: tm-edit.el,v 7.75 1996/07/31 02:51:16 morioka Exp $")
+  "$Id: tm-edit.el,v 7.76 1996/08/06 12:29:11 morioka Exp $")
 
 (defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
 
@@ -1665,10 +1665,13 @@ Content-Transfer-Encoding: 7bit
 (defun mime-editor/encrypt-pgp-elkins (beg end boundary)
   (save-excursion
     (save-restriction
-      (let ((from (rfc822/get-field-body "From" mail-header-separator))
-           (to (rfc822/get-field-body "To" mail-header-separator))
-           (cc (rfc822/get-field-body "cc" mail-header-separator))
-           recipients)
+      (let (from to cc recipients)
+       (let ((ret (rfc822/get-field-bodies
+                   '("From" "To" "cc") nil mail-header-separator)))
+         (setq from (car ret)  ret (cdr ret)
+               to (car ret)    ret (cdr ret)
+               cc (car ret))
+         )
        (narrow-to-region beg end)
        (let* ((ret
                (mime-editor/translate-region beg end boundary))
index e0f3f6d..151047f 100644 (file)
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Version:
-;;;    $Id: tm-setup.el,v 7.3 1996/05/08 15:00:00 morioka Exp $
+;;;    $Id: tm-setup.el,v 7.4 1996/08/06 12:12:53 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
 
 (defvar tm-setup/use-gnusutil nil)
 
-(let ((le (function
-          (lambda ()
-            (require 'tm-gnus)
-            ))
-         ))
-  (if (and (boundp 'MULE) tm-setup/use-gnusutil)
-      (progn
-       (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
-       (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
-       (autoload 'gnusutil-initialize "gnusutil")
-       (autoload 'gnusutil-add-group "gnusutil")
-       (add-hook 'gnusutil-initialize-hook le)
-       )
+(defun tm-setup/load-GNUS ()
+  (require 'tm-gnus)
+  )
+
+(if (and (boundp 'MULE) tm-setup/use-gnusutil)
     (progn
-      (add-hook 'gnus-Startup-hook le 'append)
-      (add-hook 'gnus-startup-hook le 'append)
-      )))
+      (add-hook 'gnus-Group-mode-hook (function gnusutil-initialize))
+      (add-hook 'gnus-group-mode-hook (function gnusutil-initialize))
+      (autoload 'gnusutil-initialize "gnusutil")
+      (autoload 'gnusutil-add-group "gnusutil")
+      (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS)
+      )
+  (add-hook 'gnus-Startup-hook 'tm-setup/load-GNUS 'append)
+  (add-hook 'gnus-startup-hook 'tm-setup/load-GNUS 'append)
+  )
+
+
+;;; @ for Gnus
+;;;
+
+(defun tm-setup/load-gnus ()
+  (let (gnus-load-hook)
+    (remove-hook 'gnus-startup-hook 'tm-setup/load-GNUS)
+    (require 'gnus-mime)
+    ))
+
+(add-hook 'gnus-load-hook 'tm-setup/load-gnus)
 
 
 ;;; @ end