X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=semi-setup.el;h=1eecdbbbed700eaef318c22ac99e6ff108b831fb;hb=2d6c5838a24c491b9e210c9a504e453abbce62dc;hp=0bda5d21a33965d434893c5861ef4e91c9bd0fd9;hpb=8722ec904ba9493aab9d555a8043b08dfc8e8455;p=elisp%2Fsemi.git diff --git a/semi-setup.el b/semi-setup.el index 0bda5d2..1eecdbb 100644 --- a/semi-setup.el +++ b/semi-setup.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: semi-setup.el,v 0.14 1997-03-14 08:02:48 morioka Exp $ +;; Version: $Id: semi-setup.el,v 0.16 1997-03-18 13:06:09 morioka Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -29,18 +29,6 @@ (require 'file-detect) -;;; @ for mime-view -;;; - -(call-after-loaded - 'mime-view - (function - (lambda () - ;; for message/partial - (require 'mime-partial) - ))) - - ;; for image/* and X-Face (defvar mime-setup-enable-inline-image (and window-system @@ -72,6 +60,66 @@ ) +;;; @ for mime-edit +;;; + +(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.") + +(defvar mime-setup-default-signature-key "\C-c\C-s" + "*Key to insert signature.") + +(defvar mime-setup-signature-key-alist '((mail-mode . "\C-c\C-w")) + "Alist of major-mode vs. key to insert signature.") + + +;;; @@ 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) + + ;;; @ end ;;;