From: morioka Date: Fri, 14 Mar 1997 08:46:50 +0000 (+0000) Subject: Only loads MUA specific setup files. X-Git-Tag: Hokutetsu-Ishikawa-new~148 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89ab62d18b1be4e948a4c65f5255388d9ad31de5;p=elisp%2Fsemi.git Only loads MUA specific setup files. --- diff --git a/mime-setup.el b/mime-setup.el index 12b1016..e533375 100644 --- a/mime-setup.el +++ b/mime-setup.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Version: -;; $Id: mime-setup.el,v 0.10 1997-03-07 14:34:16 morioka Exp $ +;; $Id: mime-setup.el,v 0.11 1997-03-14 08:46:50 morioka Exp $ ;; Keywords: MIME, multimedia, multilingual, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -26,134 +26,17 @@ ;;; Code: -(require 'semi-setup) -(require 'alist) +(load "mail-mime-setup") -(autoload 'turn-on-mime-edit "mime-edit" - "Unconditionally turn on MIME-Edit minor mode." t) +(condition-case err + (load "gnus-mime-setup") + (error (message "gnus-mime-setup is not found.")) + ) -(autoload 'eword-decode-header "eword-decode" - "Decode MIME encoded-words in header fields." t) - -(defun mime-setup-decode-message-header () - (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) - )) - (eword-decode-header) - (set-buffer-modified-p nil) - ))) - -(add-hook 'mime-edit-mode-hook 'mime-setup-decode-message-header) - - -;;; @ variables -;;; - -(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 -;;; - -(defun mime-setup-set-signature-key () - (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)) - )) - -(if mime-setup-use-signature - (progn - (autoload 'insert-signature "signature" "Insert signature" t) - (add-hook 'mime-edit-mode-hook 'mime-setup-set-signature-key) - (setq gnus-signature-file nil) - (setq mail-signature nil) - (setq message-signature nil) - )) - - -;;; @ for mu-cite -;;; - -(add-hook 'mu-cite/pre-cite-hook 'eword-decode-header) - - -;;; @ for mail-mode, RMAIL and VM -;;; - -(add-hook 'mail-setup-hook 'eword-decode-header) -(add-hook 'mail-setup-hook 'turn-on-mime-edit 'append) -(add-hook 'mail-send-hook 'mime-edit-maybe-translate) -(set-alist 'mime-edit-split-message-sender-alist - 'mail-mode (function - (lambda () - (interactive) - (funcall send-mail-function) - ))) - -;;; @ for mh-e -;;; - -(defun mime-setup-mh-draft-setting () - (turn-on-mime-edit) - (make-local-variable 'mail-header-separator) - (setq mail-header-separator "--------") - (save-excursion - (goto-char (point-min)) - (setq buffer-read-only nil) - (if (re-search-forward "^-*$" nil t) - (progn - (replace-match mail-header-separator) - (set-buffer-modified-p (buffer-modified-p)) - )) - )) - -(add-hook 'mh-letter-mode-hook 'mime-setup-mh-draft-setting t) -(add-hook 'mh-before-send-letter-hook 'mime-edit-maybe-translate) - - -;;; @ for message (September Gnus 0.58 or later) -;;; - -(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) - )))) - -(add-hook 'message-setup-hook 'turn-on-mime-edit) -(add-hook 'message-setup-hook 'message-maybe-setup-default-charset) -(add-hook 'message-send-hook 'mime-edit-maybe-translate) -(add-hook 'message-header-hook 'eword-encode-header) - -(call-after-loaded - 'message - (function - (lambda () - (require 'message-mime) - ))) +(condition-case err + (load "emh-setup") + (error (message "emh-setup is not found.")) + ) ;;; @ end