tm 6.54
[elisp/tm.git] / mh-e / tm-mh-e3.el
1 ;;;
2 ;;; $Id: tm-mh-e3.el,v 4.0 1995/06/18 16:26:37 morioka Exp $
3 ;;;
4 ;;; This is a part of tm-mh-e.el which is a module for old mh-e
5 ;;; to emulate mh-e 4.*.
6 ;;;
7 ;;; This module imports from mh-e 4.1.
8 ;;;
9
10 (require 'mh-e)
11
12 ;;; Ensure new buffers won't get this mode if default-major-mode is nil.
13 (put 'mh-show-mode 'mode-class 'special)
14
15 (defun mh-show-mode ()
16   "Major mode for showing messages in mh-e.
17 The value of mh-show-mode-hook is called when a new message is displayed."
18   (kill-all-local-variables)
19   (setq major-mode 'mh-show-mode)
20   (mh-set-mode-name "MH-Show")
21   (run-hooks 'mh-show-mode-hook))
22
23 (defun mh-start-of-uncleaned-message ()
24   ;; position uninteresting headers off the top of the window
25   (let ((case-fold-search t))
26     (re-search-forward
27      "^To:\\|^From:\\|^Subject:\\|^Date:" nil t)
28     (beginning-of-line)
29     (mh-recenter 0)))
30
31 (fset 'mh-show-msg (symbol-function 'mh-show))
32
33 (provide 'tm-mh-e3)