This commit was generated by cvs2svn to compensate for changes in r533,
[elisp/tm.git] / gnus / tm-gnus4.el
index 3a0d93d..3578ac3 100644 (file)
@@ -7,8 +7,9 @@
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; modified by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;;         and KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
 ;;; Created: 1993/11/20 (merged tm-gnus5.el)
-;;; Version: $Revision: 7.17 $
+;;; Version: $Revision: 7.20 $
 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -37,7 +38,7 @@
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-gnus4.el,v 7.17 1996/02/27 19:06:05 morioka Exp $")
+  "$Id: tm-gnus4.el,v 7.20 1996/06/09 06:53:41 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for 3.15 .. 5.1.*"))
@@ -123,6 +124,69 @@ This variable is set to `gnus-show-mime'.")
     )))
 
 
+;;; @ 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 (;; for Emacs 19
+       (mail-citation-hook '(mime-editor/inserted-message-filter))
+       news-reply-header-hook
+       mail-yank-hooks
+       
+       ;; for Emacs 18
+       (mail-yank-ignored-headers mime-editor/yank-ignored-field-regexp)
+       (news-make-reply-yank-header (function
+                                     (lambda (message-id from) "")
+                                     ))
+       (news-yank-original-quoting-indicator "")
+       
+       ;; select raw article buffer
+       (mail-reply-buffer
+        (save-excursion
+          (set-buffer gnus-article-buffer)
+          (if (eq major-mode 'mime/viewer-mode)
+              mime::preview/article-buffer
+            gnus-article-buffer)))
+       )
+    (news-reply-yank-original 0)
+    ))
+
+;;; 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
+              'news-reply-mode (function tm-gnus/insert-article))
+    
+    (autoload 'tm-mail/insert-message "tm-mail")
+    (set-alist 'mime-editor/message-inserter-alist
+              'mail-mode (function tm-mail/insert-message))
+    (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
+              'news-reply-mode
+              (function gnus-inews-news))
+    )))
+
+
 ;;; @ for tm-partial
 ;;;
 
@@ -213,6 +277,31 @@ This variable is set to `gnus-show-mime'.")
 (setq gnus-show-mime t)
 
 
+;;; @ 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 'tm-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
 ;;;