(emh-quitting-method): Use `mime-hide-echo-buffer'.
[elisp/emh.git] / emh-setup.el
1 ;;; emh-setup.el --- setup file for emh.
2
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: emh-setup.el,v 0.0 1997-03-14 08:48:46 morioka Exp $
7 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
8
9 ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
10
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
15
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 ;; General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Code:
27
28 (require 'semi-setup)
29
30
31 ;;; @ for emh
32 ;;;
33
34 (defun emh-setup ()
35   (require 'emh)
36   )
37
38 (call-after-loaded 'mh-e 'emh-setup 'mh-folder-mode-hook)
39 (or (featurep 'mh-e)
40     (add-hook 'mh-letter-mode-hook 'emh-setup)
41     )
42
43
44 ;;; @ for mime-edit
45 ;;;
46
47 (autoload 'turn-on-mime-edit "mime-edit"
48   "Unconditionally turn on MIME-Edit minor mode." t)
49
50 (defun emh-setup-mh-draft-setting ()
51   (turn-on-mime-edit)
52   (make-local-variable 'mail-header-separator)
53   (setq mail-header-separator "--------")
54   (save-excursion
55     (goto-char (point-min))
56     (setq buffer-read-only nil)
57     (if (re-search-forward "^-*$" nil t)
58         (progn
59           (replace-match mail-header-separator)
60           (set-buffer-modified-p (buffer-modified-p))
61           ))
62     ))
63
64 (add-hook 'mh-letter-mode-hook 'emh-setup-mh-draft-setting t)
65 (add-hook 'mh-before-send-letter-hook 'mime-edit-maybe-translate)
66
67
68 ;;; @ end
69 ;;;
70
71 (provide 'emh-setup)
72
73 ;;; emh-setup.el ends here