This commit was generated by cvs2svn to compensate for changes in r296,
[elisp/tm.git] / tm-setup.el
index 5101186..36c98ad 100644 (file)
@@ -1,85 +1,97 @@
 ;;;
-;;; $Id: tm-setup.el,v 6.0 1995/04/18 19:40:11 morioka Exp $
+;;; $Id: tm-setup.el,v 7.1 1995/12/20 15:27:35 morioka Exp $
 ;;;
 
-(provide 'tm-setup)
+(require 'tl-misc)
+
 
-;;; @ for Emacs 18
+;;; @ for tm-view
 ;;;
-(if (< (string-to-int emacs-version) 19)
-    (progn
-      (require 'tl-18)
-      (defvar buffer-undo-list nil)
-      ))
 
+(call-after-loaded
+ 'tm-view
+ (function
+  (lambda ()
+    ;; for message/partial
+    (require 'tm-partial)
+    
+    ;; for anonymous ftp
+    (set-atype 'mime/content-decoding-condition
+              '((type . "message/external-body")
+                ("access-type" . "anon-ftp")
+                (method . mime/decode-message/external-ftp)
+                ))
+    (autoload 'mime/decode-message/external-ftp "tm-ftp")
 
-;;; @ for LaTeX
-;;;
-(add-hook 'tm-view-load-hook
-         (function
-          (lambda ()
-            ;; for message/partial
-            (require 'tm-partial)
-            
-            ;; for LaTeX
-            (set-atype 'mime/content-decoding-condition
-                       '((type . "text/x-latex")
-                         (method . mime/decode-text/latex)
-                         ))
-            (set-atype 'mime/content-decoding-condition
-                       '((type . "application/x-latex")
-                         (method . mime/decode-text/latex)
-                         ))
-            ;;(set-atype 'mime/content-decoding-condition
-            ;;         '((type . "application/octet-stream")
-            ;;           ("type" . "latex")
-            ;;           (method . mime/decode-text/latex)
-            ;;           ))
-            (autoload 'mime/decode-text/latex "tm-latex")
-            )))
-
-
-;;; @ for Anonymous FTP (need of ange-ftp)
-;;;
-(add-hook 'tm-view-load-hook
-         (function
-          (lambda ()
-            (set-atype 'mime/content-decoding-condition
-                       '((type . "message/external-body")
-                         ("access-type" . "anon-ftp")
-                         (method . mime/decode-message/external-ftp)
-                         ))
-            (autoload 'mime/decode-message/external-ftp "tm-ftp")
-            )))
+    ;; for text/richtext
+    (set-alist 'mime-viewer/content-filter-alist
+              "text/richtext" (function mime-viewer/filter-text/richtext))
+    (autoload 'mime-viewer/filter-text/richtext "tm-rich")
+
+    ;; for text/enriched
+    (set-alist 'mime-viewer/content-filter-alist
+              "text/enriched" (function mime-viewer/filter-text/enriched))
+    (autoload 'mime-viewer/filter-text/enriched "tm-rich")
+
+    ;; for image/*
+    (if (string-match "XEmacs" emacs-version)
+       (require 'tm-image)
+      )
+    
+    ;; for LaTeX
+    (set-atype 'mime/content-decoding-condition
+              '((type . "text/x-latex")
+                (method . mime/decode-text/latex)
+                ))
+    (set-atype 'mime/content-decoding-condition
+              '((type . "application/x-latex")
+                (method . mime/decode-text/latex)
+                ))
+    ;;(set-atype 'mime/content-decoding-condition
+    ;;         '((type . "application/octet-stream")
+    ;;           ("type" . "latex")
+    ;;           (method . mime/decode-text/latex)
+    ;;           ))
+    (autoload 'mime/decode-text/latex "tm-latex")
+    )))
 
 
 ;;; @ for RMAIL
 ;;;
-(require 'tm-rmail)
+
+(call-after-loaded 'rmail
+                  (function
+                   (lambda ()
+                     (require 'tm-rmail)
+                     ))
+                  'rmail-mode-hook)
 
 
 ;;; @ for mh-e
 ;;;
-(add-hook 'mh-folder-mode-hook
-         (function
-          (lambda ()
-            (require 'tm-mh-e)
-            )))
-(add-hook 'mh-letter-mode-hook
-         (function
+
+(let ((le (function
           (lambda ()
             (require 'tm-mh-e)
-            )))
+            ))
+         ))
+  (call-after-loaded 'mh-e le 'mh-folder-mode-hook)
+  (if (not (featurep 'mh-e))
+      (add-hook 'mh-letter-mode-hook le)
+    ))
 
 
 ;;; @ for GNUS
 ;;;
+
+(defvar tm-setup/use-gnusutil nil)
+
 (let ((le (function
           (lambda ()
             (require 'tm-gnus)
-            )))
-      )
-  (if (boundp 'MULE)
+            ))
+         ))
+  (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))
        (add-hook 'gnusutil-initialize-hook le)
        )
     (progn
-      (add-hook 'gnus-Startup-hook le)
-      (add-hook 'gnus-startup-hook le)
+      (add-hook 'gnus-Startup-hook le 'append)
+      (add-hook 'gnus-startup-hook le 'append)
       )))
 
+
+;;; @ end
+;;;
+
+(provide 'tm-setup)
+
 ;;; Local Variables:
 ;;; mode: emacs-lisp
 ;;; mode: outline-minor