X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=tm-setup.el;h=913e5c440919fb6f1eae4fe44d7c26e378246d2a;hb=f27e1ceb6dcdeb5192325d77dbe989c46b3bcaae;hp=50b359be16f730ed3aaf693608bf4918003dd67d;hpb=d1c9836993bb1014ba3f50ae3367706b3be2f711;p=elisp%2Ftm.git diff --git a/tm-setup.el b/tm-setup.el index 50b359b..913e5c4 100644 --- a/tm-setup.el +++ b/tm-setup.el @@ -1,6 +1,31 @@ ;;; -;;; $Id: tm-setup.el,v 6.3 1995/09/10 15:45:42 morioka Exp $ +;;; tm-setup.el --- setup file for tm viewer. ;;; +;;; Copyright (C) 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko +;;; +;;; Author: MORIOKA Tomohiko +;;; Version: +;;; $Id: tm-setup.el,v 7.6 1996/08/07 05:59:03 morioka Exp $ +;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word +;;; +;;; This file is part of tm (Tools for MIME). +;;; +;;; 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 'tl-misc) @@ -22,16 +47,11 @@ (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 running-xemacs + (require 'tm-image) + ) ;; for LaTeX (set-atype 'mime/content-decoding-condition @@ -54,7 +74,12 @@ ;;; @ for RMAIL ;;; -(require 'tm-rmail) +(call-after-loaded 'rmail + (function + (lambda () + (require 'tm-rmail) + )) + 'rmail-mode-hook) ;;; @ for mh-e @@ -71,28 +96,42 @@ )) -;;; @ for GNUS +;;; @ for GNUS and Gnus ;;; -(defvar tm-setup/use-gnusutil nil) - -(let ((le (function - (lambda () - (require 'tm-gnus) - )) - )) +(if (featurep 'gnus) + (if (boundp 'gnus-load-hook) + (require 'gnus-mime) + (require 'tm-gnus) + ) + ;; for GNUS + (defvar tm-setup/use-gnusutil nil) + + (defun tm-setup/load-GNUS () + (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) + (add-hook 'gnusutil-initialize-hook 'tm-setup/load-GNUS) ) - (progn - (add-hook 'gnus-Startup-hook le) - (add-hook 'gnus-startup-hook le) - ))) + (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 @@ -100,8 +139,4 @@ (provide 'tm-setup) -;;; Local Variables: -;;; mode: emacs-lisp -;;; mode: outline-minor -;;; outline-regexp: ";;; @+\\|(......" -;;; End: +;;; tm-setup.el ends here