Newsgroups: fj.editor.emacs,fj.mail,fj.sources
Path: galaxy.trc.rwcp.or.jp!jaist-news!morioka
From: morioka@jaist.ac.jp (=?ISO-2022-JP?B?GyRCPGkyLBsoQiAbJEJDTkknGyhC?= /
 MORIOKA Tomohiko)
Subject: =?ISO-2022-JP?B?GyRCNEowVxsoQg==?= MIME header encoder/decoder:
 tiny-mime.el version 2.6 [5/5]
Content-Type: multipart/mixed; boundary="Multipart Fri Dec  3 21:28:54 1993"
Message-ID: <MORIOKA.93Dec3212854@is15e0s03.jaist.ac.jp>
Sender: news@jaist.ac.jp (News System Administrator)
X-Nsubject: $B4J0W(B MIME header encoder/decoder: tiny-mime.el version 2.6 [5/5]
Content-Transfer-Encoding: 7bit
Organization: JAIST, Hokuriku; Tatsunokuchi, Ishikawa, Japan /
 =?ISO-2022-JP?B?GyRCS0xOJkBoQzwySjNYNTs9UUJnM1gxIUJnM1gbKEIgGyRCQFAbKEI=?=
 =?ISO-2022-JP?B?GyRCQG44KUc9SH43NEMkOH1ELhsoQg==?=
Mime-Version: 1.0
Date: Fri, 3 Dec 1993 12:28:54 GMT
Lines: 149
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:4228 fj.mail:1455 fj.sources:2919
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.mail&nb=1455&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

--Multipart Fri Dec  3 21:28:54 1993
Content-Type: text/plain; charset=ISO-2022-JP

  tm-mh-e.el $B$r$*FO$1$7$^$9!#(B

  tm-mh-e.el $B$O(B mh-e with tiny-mime patch $B$N8e7Q$G$9!#(B

  mh-e $B$K(B patch $B$rEv$F$kI,MW$,$J$$$N$G!"(Bmh-e version 3.8 $B0J30$G$b;H$((B
$B$k$+$bCN$l$^$;$s$,!";n$7$F$J$$$N$G$o$+$j$^$;$s!#(B

  $B$G$O!"Nc$K$h$C$F!"$_$s$J$NBg9%$-$J(B (^_^) MIME $B7A<0$G!"0J2<$K!"%W%m%0(B
$B%i%`$r:\$;$^$9!#(BMIME $B$N(B body-part $BBP1~$NJ}$O(B MIME $B$G=hM}$7$F2<$5$$!#$=(B
$B$&$G$J$$J}$O!"(Beditor $BEy$G@Z$j=P$7$F2<$5$$!#(B

--Multipart Fri Dec  3 21:28:54 1993
Content-Type: application/octet-stream; name="tm-mh-e.el"; type=elisp
Content-Transfer-Encoding: 7bit

;;;
;;; $Id: tm-mh-e.el,v 1.3 1993/11/28 12:11:47 morioka Exp morioka $
;;;
;;;   A MIME extension for mh-e
;;;
;;; by Morioka Tomohiko, 1993/11/21

(require 'tm-misc)

(defvar mh-e-mime/message-full-decoding-method nil)

(defun mh-e-mime/toggle-header-decoding-mode (arg)
  "Toggle MIME header processing.
With arg, turn MIME processing on if arg is positive."
  (interactive "P")
  (setq mime/header-decoding-mode
(if (null arg)
    (not mime/header-decoding-mode)
  arg))
  (mh-show (mh-get-msg-num t) t)
  )

;;; @ MIME full decode message
;;;
(defun mh-e-mime/full-decode-message (arg)
  "MIME full-decode this message."
  (interactive "P")
  (setq mh-e-mime/message-full-decoding-method 'metamail-buffer)
  (mh-show (mh-get-msg-num t) t)
  (setq mh-e-mime/message-full-decoding-method nil)
  )

;;; @ mh-e show functions
;;;   These functions inported from mh-e.el version 3.8

(defun mh-e-mime/show (&optional msg need-to-show)
  "Show MESSAGE (default: displayed message).
Forces a two-window display with the folder window on top (size
mh-summary-height) and the show buffer below it."
  (interactive)
  (if (not msg)
      (setq msg (mh-get-msg-num t)))
  (setq mh-showing t)
  (mh-set-mode-name "mh-e show")
  (if (not (eql (next-window (minibuffer-window)) (selected-window)))
      (delete-other-windows)); force ourself to the top window
  (let ((folder mh-current-folder))
    (mh-show-message-in-other-window)
    (mh-display-msg msg folder need-to-show))
  (other-window -1)
  (if (not (= (1+ (window-height)) (screen-height))) ;not horizontally split
      (shrink-window (- (window-height) mh-summary-height)))
  (mh-recenter nil)
  (if (not (memq msg mh-seen-list)) (mh-push msg mh-seen-list)))

(defun mh-e-mime/display-msg (msg-num folder &optional need-to-show)
  ;; Display message NUMBER of FOLDER.
  ;; Sets the current buffer to the show buffer.
  (set-buffer folder)
  ;; 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))
(show-buffer mh-show-buffer)
(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))
 need-to-show)
     ;; 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))))
     (cond (mh-e-mime/message-full-decoding-method
    (run-hooks 'mh-e-mime/message-full-decoding-method))
   (mime/header-decoding-mode
    (mime/decode-message-header))
   )
     (set-buffer-modified-p nil)
     (setq buffer-file-name msg-filename)
     (set-mark nil)
     (setq mode-line-buffer-identification
   (list (format mh-show-buffer-mode-line-buffer-id
 folder msg-num))))))

(if (boundp 'mh-folder-mode-hook)
    (defvar mh-e-mime/original-folder-mode-hook mh-folder-mode-hook)
  (defvar mh-e-mime/original-folder-mode-hook nil))

(setq mh-folder-mode-hook
      (append-hooks mh-e-mime/original-folder-mode-hook
    '(lambda ()
       (fset 'mh-show 'mh-e-mime/show)
       (fset 'mh-display-msg 'mh-e-mime/display-msg)
       (define-key mh-folder-mode-map
 "\et" 'mh-e-mime/toggle-header-decoding-mode)
       (define-key mh-folder-mode-map
 "v" 'mh-e-mime/full-decode-message)
       )))
--Multipart Fri Dec  3 21:28:54 1993
Content-Type: text/plain; charset=ISO-2022-JP

$B(.!X$o$+$i$s$+$M!)!D$`$m$s!"%8%g!<%/$@$h!Y(,(,(,(,(,(,(,(,(,(,(,(,(,(/(B
$B(-(B                  $B<i2,(B $BCNI'(B (MORIOKA Tomohiko)                    $B(-(B
$B(-!!(B                                    Email: <morioka@jaist.ac.jp>$B(-(B
$B(1(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(0(B
--Multipart Fri Dec  3 21:28:54 1993--
