;;; ;;; mime-setup.el --- setup file to use tm and mime.el. ;;; ;;; Copyright (C) 1995 Free Software Foundation, Inc. ;;; Copyright (C) 1994,1995 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: ;;; $Id: mime-setup.el,v 7.9 1995/10/28 06:02:53 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). ;;; (require 'tm-setup) (autoload 'mime/editor-mode "tm-edit" "Minor mode for editing MIME message." t) (add-hook 'mime/editor-mode-hook (function (lambda () (save-excursion (save-restriction (goto-char (point-min)) (narrow-to-region (point-min) (if (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (match-beginning 0) (point-max) )) (mime/decode-message-header) (set-buffer-modified-p nil) ))))) ;;; @ variables ;;; (defvar mime-setup-use-sc nil) (defvar mime-setup-use-signature t) (defvar mime-setup-default-signature-key "\C-c\C-s") (defvar mime-setup-signature-key-alist '((mail-mode . "\C-c\C-w"))) ;;; @ for signature ;;; (if mime-setup-use-signature (progn (autoload 'insert-signature "signature" "Insert signature" t) (add-hook 'mime/editor-mode-hook (function (lambda () (let ((key (or (cdr (assq major-mode mime-setup-signature-key-alist) ) mime-setup-default-signature-key))) (define-key (current-local-map) key (function insert-signature)) )))) (setq gnus-signature-file nil) )) ;;; @ about SuperCite ;;; (if mime-setup-use-sc (require 'sc-setup) ) ;;; @ for RMAIL ;;; (add-hook 'mail-mode-hook 'mime/editor-mode) (add-hook 'mail-setup-hook 'mime/decode-message-header) (add-hook 'mail-send-hook 'mime-editor/maybe-translate) ;;; @ for mh-e ;;; (add-hook 'mh-letter-mode-hook (function (lambda () (mime/editor-mode) (make-local-variable 'mail-header-separator) (setq mail-header-separator "--------") (save-excursion (goto-char (point-min)) (if (re-search-forward "^-*$" nil t) (progn (replace-match mail-header-separator) (set-buffer-modified-p (buffer-modified-p)) )) ) )) t) (add-hook 'mh-before-send-letter-hook 'mime-editor/maybe-translate) ;;; @ for GNUS ;;; (add-hook 'news-reply-mode-hook 'mime/editor-mode) (add-hook 'news-inews-hook 'mime-editor/maybe-translate) ;;; @ end ;;; (provide 'mime-setup) (run-hooks 'mime-setup-load-hook)