Newsgroups: fj.editor.emacs,fj.sources
Path: galaxy.trc.rwcp.or.jp!jaist-news!morioka
From: morioka@jaist.ac.jp (=?ISO-2022-JP?B?GyRCPGkyLBsoQiAbJEJDTkknGyhC?= /
 MORIOKA Tomohiko)
Subject: tm-misc.el,v 1.7
In-Reply-To: morioka@jaist.ac.jp's message of Fri, 25 Feb 1994 05:40:33 GMT
Content-Type: multipart/mixed; boundary="Multipart Fri Feb 25 15:16:48 1994"
Message-ID: <MORIOKA.94Feb25151648@is15e0s03.jaist.ac.jp>
Sender: news@jaist.ac.jp (News System Administrator)
Content-Transfer-Encoding: 7bit
Organization: JAIST, Hokuriku / =?ISO-2022-JP?B?GyRCS0xOJkBoQzwySjNYGyhC?=
 =?ISO-2022-JP?B?GyRCNTs9UUJnM1gxIUJnM1gbKEI=?=
Mime-Version: 1.0
Date: Fri, 25 Feb 1994 06:16:48 GMT
Dnas-Posting-Host: is15e0s03
Lines: 89
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:4455 fj.sources:2925
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.editor.emacs&nb=4455&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 Feb 25 15:16:48 1994
Content-Type: text/plain; charset=ISO-2022-JP


  tiny-mime.el,v 3.1 $B$KBP1~$7$?(B tm-gnus, tm-mh-e $BMQ$N6&DL%b%8%e!<%k$G(B
$B$9!#(B

--Multipart Fri Feb 25 15:16:48 1994
Content-Type: application/octet-stream; name="tm-misc.el"; type=emacs-lisp
Content-Transfer-Encoding: 7bit

;;;
;;; $Id: tm-misc.el,v 1.7 1994/02/07 09:17:57 morioka Exp morioka $
;;;
;;;   MIME utility for tm-*.el MIME user agent packages
;;;
;;; by Morioka Tomohiko, 1993/11/21

(provide 'tm-misc)
(require 'tiny-mime)

;;; (autoload 'mime/decode-message-header "tiny-mime" "decode MIME header." t)
;;; (autoload 'mime/decode-string "tiny-mime"
;;;      "decode MIME encoded-words in this string." t)
;;; (autoload 'metamail-buffer "metamail" "full-decode MIME message." t)

(defvar mime/header-decoding-mode t "*Decode MIME header if non-nil.")

(defun mime/add-header-decoding-mode-to-mode-line ()
  (or (assq 'mime/header-decoding-mode minor-mode-alist)
      (setq minor-mode-alist
    (cons (list 'mime/header-decoding-mode " MIME")
  minor-mode-alist))
      ))

;;; @ about functions
;;;

(defun get-lambda-body (l)
  (if (listp l)
      (if (>= (length l) 2)
  (cdr (cdr l))
(list l)
)
    (list (list l))
    ))

(defun append-hooks (a b)
  (append (list 'lambda ())
  (get-lambda-body a)
  (get-lambda-body b)
  ))

;;; @ about rightful dividing for multi-octet string
;;;
;; by mol. 1993/9/26
(defun rightful-boundary-short-string (str width)
  (substring str 0 
     (let ((i 0) (w 0) chr (len (length str)))
       (catch 'label
 (while (< i len)
   (setq chr (elt str i))
   (setq w (+ w (char-width chr)))
   (if (> w width)
       (throw 'label i))
   (setq i (+ i (char-bytes chr)))
   )
 i))
     ))

;;; @ functions to check field
;;;
(defun mime/exist-encoded-word-in-subject ()
  (string-match
   mime/encoded-word-regexp
   (save-excursion
     (save-restriction
       (goto-char (point-min))
       (if (re-search-forward "^Subject:.*\\(\n\\( \\|\t\\)+.*\\)*" nil t)
   (buffer-substring (match-beginning 0) (match-end 0))
 )
       ))))
--Multipart Fri Feb 25 15:16:48 1994
Content-Type: text/plain; charset=ISO-2022-JP

======$B!X?M$K$O$=$l$>$l0[$J$kL4$H$=$NJ}K!$,$"$C$FA3$k$Y$-$G$"$k!Y(B======
                     $B<i2,(B $BCNI'(B (MORIOKA Tomohiko)
                     Email: <morioka@jaist.ac.jp>
--Multipart Fri Feb 25 15:16:48 1994--
