This commit was generated by cvs2svn to compensate for changes in r437,
[elisp/tm.git] / gnus / gnus-mime.el
index 3b47692..7829b51 100644 (file)
@@ -1,58 +1,39 @@
-;;;
 ;;; 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.3 $
-;;; 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)
-      )))
+;; Copyright (C) 1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Created: 1996/8/6
+;; Version: $Revision: 0.6 $
+;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+
+;; This file is not part of GNU Emacs yet.
 
-(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))
-       ))
+;; 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; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(require 'tl-misc)
 
 
 ;;; @ version
 ;;;
 
 (defconst gnus-mime-RCS-ID
-  "$Id: gnus-mime.el,v 0.3 1996/08/07 16:31:12 morioka Exp $")
+  "$Id: gnus-mime.el,v 0.6 1996/08/22 17:55:17 morioka Exp $")
 
 (defconst gnus-mime-version
   (get-version-string gnus-mime-RCS-ID))
@@ -151,32 +132,6 @@ The function is called from the article buffer.")
     )))
 
 
-;;; @ for tm-edit
-;;;
-
-;;; 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 ()
-    (if (string-match "XEmacs\\|Lucid" emacs-version)
-       (add-hook 'news-setup-hook 'mime-editor/attach-to-news-reply-menu)
-      )
-    )))
-
-
 ;;; @ end
 ;;;
 
@@ -206,6 +161,30 @@ The function is called from the article buffer.")
            
            (setq gnus-strict-mime nil)
            ))
+      
+      (if running-xemacs
+         (progn
+           ;; 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 ()
+               (add-hook 'news-setup-hook
+                         'mime-editor/attach-to-news-reply-menu)
+               )))
+           ))
       ))
 
 (run-hooks 'gnus-mime-load-hook)