+++ /dev/null
-;;;
-;;; $Id: tm-mh-e3.el,v 1.2 1994/11/01 18:06:16 morioka Exp $
-;;;
-;;; This is a part of tm-mh-e.el which is a module for old mh-e
-;;; to emulate mh-e 4.0.
-;;;
-;;; This module imports from mh-e 3.8 and 4.0.
-;;;
-
-(provide 'tm-mh-e3)
-
-;;; Ensure new buffers won't get this mode if default-major-mode is nil.
-(put 'mh-show-mode 'mode-class 'special)
-
-(defun mh-show-mode ()
- "Major mode for showing messages in mh-e.
-The value of mh-show-mode-hook is called when a new message is displayed."
- (kill-all-local-variables)
- (setq major-mode 'mh-show-mode)
- (mh-set-mode-name "MH-Show")
- (run-hooks 'mh-show-mode-hook))
-
-(defun mh-display-msg (msg-num folder &optional show-buffer)
- ;; Display message NUMBER of FOLDER.
- ;; Sets the current buffer to the show buffer.
- (set-buffer folder)
- (or show-buffer
- (setq show-buffer mh-show-buffer))
- ;; Bind variables in folder buffer in case they are local
- (let ((formfile mhl-formfile)
- (clean-message-header mh-clean-message-header)
- (invisible-headers mh-invisible-headers)
- (visible-headers mh-visible-headers)
- (msg-filename (mh-msg-filename msg-num))
- (folder mh-current-folder))
- (if (not (file-exists-p msg-filename))
- (error "Message %d does not exist" msg-num))
- (switch-to-buffer show-buffer)
- (if mh-bury-show-buffer (bury-buffer (current-buffer)))
- (mh-when (or (not (equal msg-filename buffer-file-name)))
- ;; Buffer does not yet contain message.
- (clear-visited-file-modtime)
- (unlock-buffer)
- (setq buffer-file-name nil) ; no locking during setup
- (erase-buffer)
- (if formfile
- (if (stringp formfile)
- (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
- "-form" formfile msg-filename)
- (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
- msg-filename))
- (insert-file-contents msg-filename))
- (goto-char (point-min))
- (cond (clean-message-header
- (mh-clean-msg-header (point-min)
- invisible-headers
- visible-headers)
- (goto-char (point-min)))
- (t
- (let ((case-fold-search t))
- (re-search-forward
- "^To:\\|^From:\\|^Subject:\\|^Date:" nil t)
- (beginning-of-line)
- (mh-recenter 0))))
- (set-buffer-modified-p nil)
- (setq buffer-file-name msg-filename)
- (set-mark nil)
- (mh-show-mode)
- (setq mode-line-buffer-identification
- (list (format mh-show-buffer-mode-line-buffer-id
- folder msg-num))))))
-
-(fset 'mh-show-msg 'mh-show)