X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-setup.el.in;h=897784167853a4f4ace26435034c4afc01021943;hb=b77b17617ad6e2d752ffa07cc4232a54c6ebae81;hp=9165ab977d30a67ff4f9fe82d7688ec2e4cb64cc;hpb=9710d631bef5981581cc482f481c8dd87cd80ec2;p=elisp%2Ftm.git diff --git a/mime-setup.el.in b/mime-setup.el.in index 9165ab9..8977841 100644 --- a/mime-setup.el.in +++ b/mime-setup.el.in @@ -1,37 +1,34 @@ -;;; ;;; mime-setup.el --- setup file for tm viewer and composer. -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko -;;; Version: -;;; $Id: mime-setup.el.in,v 7.21 1996/06/25 01:02:40 shuhei-k 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. -;;; + +;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; 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 GNU Emacs; 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 'tm-setup) (autoload 'mime/editor-mode "tm-edit" "Minor mode for editing MIME message." t) -(autoload 'mime/decode-message-header "tm-ew-d" +(autoload 'mime-decode-header-in-buffer "eword-decode" "Decode MIME encoded-words in message header." t) (defun mime-setup-decode-message-header () @@ -46,7 +43,7 @@ (match-beginning 0) (point-max) )) - (mime/decode-message-header) + (mime-decode-header-in-buffer) (set-buffer-modified-p nil) ))) @@ -56,10 +53,18 @@ ;;; @ 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"))) +(defvar mime-setup-use-sc nil + "If it is not nil, mime-setup requires sc-setup. [mime-setup.el]") + +(defvar mime-setup-use-signature t + "If it is not nil, mime-setup sets up to use signature.el. +\[mime-setup.el]") + +(defvar mime-setup-default-signature-key "\C-c\C-s" + "*Key to insert signature. [mime-setup.el]") + +(defvar mime-setup-signature-key-alist '((mail-mode . "\C-c\C-w")) + "Alist of major-mode vs. key to insert signature. [mime-setup.el]") ;;; @ for signature @@ -92,16 +97,21 @@ ;;; @ for mu-cite ;;; -(add-hook 'mu-cite/pre-cite-hook 'mime/decode-message-header) +(add-hook 'mu-cite/pre-cite-hook 'mime-decode-header-in-buffer) -;;; @ for RMAIL and VM +;;; @ for mail-mode, RMAIL and VM ;;; -(add-hook 'mail-setup-hook 'mime/decode-message-header) +(add-hook 'mail-setup-hook 'mime-decode-header-in-buffer) (add-hook 'mail-setup-hook 'mime/editor-mode 'append) (add-hook 'mail-send-hook 'mime-editor/maybe-translate) - +(set-alist 'mime-editor/split-message-sender-alist + 'mail-mode (function + (lambda () + (interactive) + (funcall send-mail-function) + ))) ;;; @ for mh-e ;;; @@ -134,18 +144,33 @@ ;;; @ for message (September Gnus 0.58 or later) ;;; -(add-hook 'message-setup-hook 'mime/editor-mode) -(add-hook 'message-send-hook 'mime-editor/maybe-translate) -(add-hook 'message-header-hook 'mime/encode-message-header) - -(call-after-loaded - 'tm-edit - (function - (lambda () - (setq message-forward-start-separator - (concat (mime-make-tag "message" "rfc822") "\n")) - ))) -(setq message-forward-end-separator "") +(defun message-maybe-setup-default-charset () + (let ((charset + (and (boundp 'gnus-summary-buffer) + (buffer-live-p gnus-summary-buffer) + (save-excursion + (set-buffer gnus-summary-buffer) + default-mime-charset)))) + (if charset + (progn + (make-local-variable 'default-mime-charset) + (setq default-mime-charset charset) + )))) + +(or (boundp 'epoch::version) + (progn + (add-hook 'message-setup-hook 'mime/editor-mode) + (add-hook 'message-setup-hook 'message-maybe-setup-default-charset) + (add-hook 'message-send-hook 'mime-editor/maybe-translate) + (add-hook 'message-header-hook 'eword-encode-header) + + (call-after-loaded + 'message + (function + (lambda () + (require 'message-mime) + ))) + )) ;;; @ end