FILES = README.eng Makefile *.el *.c methods \
doc/Makefile doc/*.pln doc/*.ol doc/*.tex
-TARFILE = tm5.12.tar
+TARFILE = tm5.13.tar
all: $(UTILS) $(DVI)
{\large translated by \Large Ueno Hiroshi} \\
{\normalsize $<$jl07715@yamato.ibm.co.jp$>$}
}
-\date{\verb$Id: tm-eng.tex,v 5.4 1994/10/17 03:05:02 morioka Exp $}
+\date{\verb$Id: tm-eng.tex,v 5.5 1994/10/20 01:44:28 morioka Exp $}
\begin{document}
\section{Emacs (original)}
-A single character set can be used if you use the original Emacs.
+US-ASCII and ISO-8859-1 can be used if you use the original Emacs.
+
\section{NEmacs, NEpoch}
\title{tm ÀâÌÀ½ñ}
\author{¼é²¬ ÃÎɧ\\
morioka@jaist.ac.jp}
-\date{\verb$Id: tm-jp.tex,v 5.4 1994/10/17 02:58:20 morioka Exp $}
+\date{\verb$Id: tm-jp.tex,v 5.5 1994/10/20 01:42:29 morioka Exp $}
\begin{document}
\section{Emacs (original)}
-Original ¤Î Emacs ¤Ç¤Ï¡¢ÅöÁ³¤Î¤³¤È¤Ê¤¬¤é¡¢Ã±°ìʸ»ú½¸¹ç¤·¤«»È¤¨¤Þ¤»¤ó¡£
+Original ¤Î Emacs ¤Ç¤Ï¡¢US-ASCII ¤È ISO-8859-1 ¤¬»È¤¨¤Þ¤¹¡£
\section{NEmacs, NEpoch}
--- /dev/null
+;;;
+;;; $Id: gnushook.el,v 1.1 1994/10/25 06:42:57 morioka Exp morioka $
+;;;
+
+(provide 'gnushook)
+
+(require 'gnus)
+
+(cond ((string-match "^GNUS 3" gnus-version)
+ (if (and (null gnus-Startup-hook)
+ (boundp 'gnus-startup-hook))
+ (setq gnus-Startup-hook gnus-startup-hook)
+ )
+ (if (and (null gnus-Select-group-hook)
+ (boundp 'gnus-select-group-hook))
+ (setq gnus-Select-group-hook gnus-select-group-hook)
+ )
+ (if (and (null gnus-Subject-mode-hook)
+ (boundp 'gnus-summary-mode-hook))
+ (setq gnus-Subject-mode-hook gnus-summary-mode-hook)
+ )
+ (if (and (null gnus-Article-mode-hook)
+ (boundp 'gnus-article-mode-hook))
+ (setq gnus-Article-mode-hook gnus-article-mode-hook)
+ )
+ (if (and (null gnus-Article-prepare-hook)
+ (boundp 'gnus-article-prepare-hook))
+ (setq gnus-Article-prepare-hook gnus-article-prepare-hook)
+ )
+ )
+ ((string-match "^GNUS 4" gnus-version)
+ (if (and (null gnus-startup-hook)
+ (boundp 'gnus-Startup-hook))
+ (setq gnus-startup-hook gnus-Startup-hook)
+ )
+ (if (and (null gnus-select-group-hook)
+ (boundp 'gnus-Select-group-hook))
+ (setq gnus-select-group-hook gnus-Select-group-hook)
+ )
+ (if (and (null gnus-summary-mode-hook)
+ (boundp 'gnus-Subject-mode-hook))
+ (setq gnus-summary-mode-hook gnus-Subject-mode-hook)
+ )
+ (if (and (null gnus-article-mode-hook)
+ (boundp 'gnus-Article-mode-hook))
+ (setq gnus-article-mode-hook gnus-Article-mode-hook)
+ )
+ (if (and (null gnus-article-prepare-hook)
+ (boundp 'gnus-Article-prepare-hook))
+ (setq gnus-article-prepare-hook gnus-Article-prepare-hook)
+ )
+ ))
;;; @ version
;;;
(defconst mime/RCS-ID
- "$Id: tiny-mime.el,v 5.1 1994/10/17 07:40:33 morioka Exp $")
+ "$Id: tiny-mime.el,v 5.3 1994/10/25 11:51:05 morioka Exp $")
(defconst mime/tiny-mime-version (get-version-string mime/RCS-ID))
field-name field-body)
(setq field-name (car ret))
(setq field-body (nth 1 ret))
- (if (string= field-body "")
- field-name
- (concat field-name " "
- (if (or (string-match "^Reply-To:$" field-name)
- (string-match "^From:$" field-name)
- (string-match "^Sender:$" field-name)
- (string-match "^Resent-Reply-To:$" field-name)
- (string-match "^Resent-From:$" field-name)
- (string-match "^Resent-Sender:$" field-name)
- (string-match "^To:$" field-name)
- (string-match "^Resent-To:$" field-name)
- (string-match "^cc:$" field-name)
- (string-match "^Resent-cc:$" field-name)
- (string-match "^bcc:$" field-name)
- (string-match "^Resent-bcc:$" field-name)
- )
- (mime/encode-address-list (+ (length field-name) 1)
- field-body)
- (catch 'label
- (let ((i 0)
- (n (length mime/no-encoding-header-fields))
- fn)
- (while (< i n)
- (setq fn (nth i mime/no-encoding-header-fields))
- (if (string-match (concat "^" fn ":$") field-name)
- (progn
- (throw 'label field-body)
- ))
- (setq i (+ i 1))
- )
- (nth 1 (mime/encode-header-string (+ (length field-name) 1)
- field-body))
- ))
- ))
- )))
+ (concat field-name " "
+ (cond ((string= field-body "") "")
+ ((or (string-match "^Reply-To:$" field-name)
+ (string-match "^From:$" field-name)
+ (string-match "^Sender:$" field-name)
+ (string-match "^Resent-Reply-To:$" field-name)
+ (string-match "^Resent-From:$" field-name)
+ (string-match "^Resent-Sender:$" field-name)
+ (string-match "^To:$" field-name)
+ (string-match "^Resent-To:$" field-name)
+ (string-match "^cc:$" field-name)
+ (string-match "^Resent-cc:$" field-name)
+ (string-match "^bcc:$" field-name)
+ (string-match "^Resent-bcc:$" field-name)
+ )
+ (mime/encode-address-list
+ (+ (length field-name) 1) field-body)
+ )
+ (t
+ (catch 'tag
+ (let ((r mime/no-encoding-header-fields) fn)
+ (while r
+ (setq fn (car r))
+ (if (string-match (concat "^" fn ":$") field-name)
+ (throw 'tag field-body)
+ )
+ (setq r (cdr r))
+ ))
+ (nth 1 (mime/encode-header-string
+ (+ (length field-name) 1) field-body))
+ ))
+ ))
+ ))
(defun mime/encode-message-header ()
(interactive "*")
(defun mime/char-type (chr)
(if (or (= chr 32)(= chr ?\t))
LC-space
- (mime/char-leading-char chr)
+ (get-lc chr)
))
(defun mime/separate-string-by-chartype (string)
--- /dev/null
+;;;
+;;; $Id$
+;;;
+
+(provide 'tl-mule)
+
+(defun get-lc (chr)
+ "Return leading character of CHAR or LEADING-CHARACTER."
+ (if (< chr 128)
+ lc-ascii
+ chr))
--- /dev/null
+;;;
+;;; $Id: tl-nemacs.el,v 1.2 1994/10/20 00:37:15 morioka Exp $
+;;;
+
+(provide 'tl-nemacs)
+
+
+;;; @ constants
+;;;
+
+(defconst *junet* 2)
+(defconst *internal* 3)
+(defconst *euc-japan* 3)
+
+(defconst lc-ascii 0)
+(defconst lc-jp 146)
+
+;; by mol. 1993/9/26
+(defun string-width (str)
+ "Return number of columns STRING will occupy.
+ [Mule compatible function in tm-nemacs]"
+ (length str))
+
+(defun char-bytes (chr)
+ "Return number of bytes CHAR will occupy in a buffer.
+ [Mule compatible function in tm-nemacs]"
+ (if (< chr 128) 1 2))
+
+(defun char-width (chr)
+ "Return number of columns CHAR will occupy when displayed.
+ [Mule compatible function in tm-nemacs]"
+ (if (< chr 128) 1 2))
+
+(defun code-convert-string (str ic oc)
+ "Convert code in STRING from SOURCE code to TARGET code,
+On successful converion, returns the result string,
+else returns nil. [Mule compatible function in tm-nemacs]"
+ (if (not (eq ic oc))
+ (convert-string-kanji-code str ic oc)
+ str))
+
+(defun check-ASCII-string (str)
+ (let ((i 0)
+ len)
+ (setq len (length str))
+ (catch 'label
+ (while (< i len)
+ (if (>= (elt str i) 128)
+ (throw 'label nil))
+ (setq i (+ i 1))
+ )
+ str)))
+
+(defun get-lc (chr)
+ "Return leading character of CHAR or LEADING-CHARACTER."
+ (if (< chr 128)
+ lc-ascii
+ lc-jp))
--- /dev/null
+;;;
+;;; $Id: tl-orig.el,v 1.2 1994/10/20 00:37:48 morioka Exp $
+;;;
+
+(provide 'tl-orig)
+
+
+;;; @ constants
+;;;
+(defconst lc-ascii 0)
+(defconst lc-ltn1 129)
+
+
+;;; @ functions
+;;;
+
+(defun get-lc (chr)
+ "Return leading character of CHAR or LEADING-CHARACTER."
+ (if (< chr 128)
+ lc-ascii
+ lc-ltn1))
+
+(defun string-width (str) (length str))
+(defun char-bytes (chr) 1)
+(defun char-width (chr) 1)
;;; @ version
;;;
(defconst tm-gnus/RCS-ID
- "$Id: tm-gnus.el,v 5.0 1994/10/17 07:18:44 morioka Exp $")
+ "$Id: tm-gnus.el,v 5.1 1994/10/25 07:17:51 morioka Exp $")
(defconst tm-gnus/version (get-version-string tm-gnus/RCS-ID))
(defvar tm-gnus/startup-hook nil)
-;;; @ to decode subject in mode-line
+;;; @ to decode subjects in mode-line
;;;
;; This function imported from gnus.el.
;;
(set-buffer-modified-p t))
+;;; @ to decode subjects in Summary buffer
+;;;
+(defun tm-gnus/decode-summary-subjects ()
+ (mapcar (function
+ (lambda (header)
+ (nntp-set-header-subject
+ header
+ (mime/decode-string (gnus-header-subject header))
+ )))
+ gnus-newsgroup-headers)
+ )
+
+
;;; @ change MIME header decoding mode, decoding or non decoding.
;;;
;;;
-;;; $Id: tm-gnus3.el,v 5.1 1994/10/03 03:45:44 morioka Exp $
+;;; $Id: tm-gnus3.el,v 5.4 1994/10/25 08:29:17 morioka Exp $
;;;
(provide 'tm-gnus3)
(require 'tm-view)
(require 'tl-list)
-(if (and (null gnus-Startup-hook)
- (boundp 'gnus-startup-hook))
- (setq gnus-Startup-hook gnus-startup-hook)
- )
-(if (and (null gnus-Select-group-hook)
- (boundp 'gnus-select-group-hook))
- (setq gnus-Select-group-hook gnus-select-group-hook)
- )
-(if (and (null gnus-Subject-mode-hook)
- (boundp 'gnus-summary-mode-hook))
- (setq gnus-Subject-mode-hook gnus-summary-mode-hook)
- )
-(if (and (null gnus-Article-mode-hook)
- (boundp 'gnus-article-mode-hook))
- (setq gnus-Article-mode-hook gnus-article-mode-hook)
- )
-(if (and (null gnus-Article-prepare-hook)
- (boundp 'gnus-article-prepare-hook))
- (setq gnus-Article-prepare-hook gnus-article-prepare-hook)
- )
-
(setq mime/go-to-top-node-method-alist
(put-alist 'gnus-Article-mode
(if (string-match (regexp-quote "3.14.4") gnus-version)
(mime/viewer-mode)
)
-(add-hook 'gnus-Select-group-hook
- (function
- (lambda ()
- (mapcar (function
- (lambda (header)
- (nntp-set-header-subject
- header
- (mime/decode-string (gnus-header-subject header))
- )))
- gnus-newsgroup-headers)
- )))
+(add-hook 'gnus-Select-group-hook (function tm-gnus/decode-summary-subjects))
(define-key gnus-Subject-mode-map
"\et" 'tm-gnus/toggle-mime-header-decoding-mode)
(fset 'gnus-Article-set-mode-line 'tm-gnus/article-set-mode-line)
(add-hook 'gnus-Article-prepare-hook
- (function
- (lambda ()
- (if mime/header-decoding-mode
- (mime/decode-message-header)
- ))) t)
+ (function mime/decode-message-header-if-you-need) t)
(if (not (string-match "^GNUS 3\.14\.4" gnus-version))
(progn
;;;
-;;; $Id: tm-gnus4.el,v 5.0 1994/09/25 21:27:13 morioka Exp $
+;;; $Id: tm-gnus4.el,v 5.4 1994/10/25 08:50:08 morioka Exp $
;;;
(provide 'tm-gnus4)
(require 'tm-gnus)
(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
-(if (and (null gnus-startup-hook)
- (boundp 'gnus-Startup-hook))
- (setq gnus-startup-hook gnus-Startup-hook)
- )
-(if (and (null gnus-select-group-hook)
- (boundp 'gnus-Select-group-hook))
- (setq gnus-select-group-hook gnus-Select-group-hook)
- )
-(if (and (null gnus-summary-mode-hook)
- (boundp 'gnus-Subject-mode-hook))
- (setq gnus-summary-mode-hook gnus-Subject-mode-hook)
- )
-(if (and (null gnus-article-mode-hook)
- (boundp 'gnus-Article-mode-hook))
- (setq gnus-article-mode-hook gnus-Article-mode-hook)
- )
-(if (and (null gnus-article-prepare-hook)
- (boundp 'gnus-Article-prepare-hook))
- (setq gnus-article-prepare-hook gnus-Article-prepare-hook)
- )
-
(defun tm-gnus/view-message (arg)
"MIME decode and play this message."
(interactive "P")
(mime/viewer-mode)
)
-(add-hook 'gnus-select-group-hook
- (function
- (lambda ()
- (mapcar (function
- (lambda (header)
- (nntp-set-header-subject
- header
- (mime/decode-string (gnus-header-subject header))
- )))
- gnus-newsgroup-headers)
- )))
+(defun tm-gnus/summary-scroll-down ()
+ "Scroll down one line current article."
+ (interactive)
+ (gnus-summary-scroll-up -1)
+ )
+
+(add-hook 'gnus-select-group-hook (function tm-gnus/decode-summary-subjects))
(define-key gnus-summary-mode-map
- "\et" 'tm-gnus/toggle-mime-header-decoding-mode)
-(define-key gnus-summary-mode-map "v" 'tm-gnus/view-message)
-(define-key gnus-summary-mode-map "\e\r"
- (function (lambda ()
- (interactive)
- (gnus-summary-scroll-up -1)
- )))
+ "\et" (function tm-gnus/toggle-mime-header-decoding-mode))
+(define-key gnus-summary-mode-map "v" (function tm-gnus/view-message))
+(define-key gnus-summary-mode-map
+ "\e\r" (function tm-gnus/summary-scroll-down))
(fset 'gnus-article-set-mode-line 'tm-gnus/article-set-mode-line)
(add-hook 'gnus-article-mode-hook
(function mime/add-header-decoding-mode-to-mode-line))
(add-hook 'gnus-article-prepare-hook
- (function
- (lambda ()
- (if mime/header-decoding-mode
- (mime/decode-message-header)
- ))) t)
+ (function mime/decode-message-header-if-you-need) t)
;;; @ version
;;;
(defconst tm-mh-e/RCS-ID
- "$Id: tm-mh-e.el,v 5.1 1994/10/17 07:26:36 morioka Exp $")
+ "$Id: tm-mh-e.el,v 5.3 1994/10/25 09:06:36 morioka Exp $")
(defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
;;; @ set up
;;;
+
+(defun tm-mh-e/decode-message-header ()
+ (make-local-variable 'minor-mode-alist)
+ (mime/add-header-decoding-mode-to-mode-line)
+ (let ((buffer-read-only nil))
+ (mime/decode-message-header-if-you-need)
+ (set-buffer-modified-p nil)
+ ))
(add-hook 'mh-show-mode-hook
- (function
- (lambda ()
- (make-local-variable 'minor-mode-alist)
- (mime/add-header-decoding-mode-to-mode-line)
- (let ((buffer-read-only nil))
- (if mime/header-decoding-mode
- (mime/decode-message-header)
- )
- (set-buffer-modified-p nil)
- ))))
+ (function tm-mh-e/decode-message-header))
(define-key mh-folder-mode-map "\et" 'tm-mh-e/toggle-header-decoding-mode)
(define-key mh-folder-mode-map "v" 'tm-mh-e/view-message)
;;;
-;;; $Id: tm-misc.el,v 5.0 1994/10/17 06:55:23 morioka Exp $
+;;; $Id: tm-misc.el,v 5.1 1994/10/25 08:31:15 morioka Exp $
;;;
;;; MIME utility for tm-*.el MIME user agent packages
;;;
(defvar mime/header-decoding-mode t "*Decode MIME header if non-nil.")
+(defun mime/decode-message-header-if-you-need ()
+ (if mime/header-decoding-mode
+ (mime/decode-message-header)
+ ))
+
(defun mime/add-header-decoding-mode-to-mode-line ()
(or (assq 'mime/header-decoding-mode minor-mode-alist)
(setq minor-mode-alist
;;;
-;;; $Id: tm-mule.el,v 4.5 1994/08/01 05:10:34 morioka Exp $
+;;; $Id: tm-mule.el,v 5.0 1994/10/19 23:47:58 morioka Exp $
;;;
(provide 'tm-mule)
(require 'tl-list)
+(require 'tl-mule)
(if (not (fboundp 'member))
(require 'tl-18)
;;; (mime/set-charset-and-encoding lc-koi8 nil "KOI8" "B")
-(defun mime/char-leading-char (chr)
- (if (< chr 128)
- lc-ascii
- chr))
-
(defun mime/remove-leading-character (str)
(let ((dest "") (i 0) (len (length str)) chr)
(while (< i len)
;;;
-;;; $Id: tm-nemacs.el,v 4.4 1994/08/01 05:09:00 morioka Exp $
+;;; $Id: tm-nemacs.el,v 5.0 1994/10/19 23:49:23 morioka Exp $
;;;
(provide 'tm-nemacs)
(require 'tl-18)
-
-;;; @ constants
-;;;
-(defconst *junet* 2)
-(defconst *internal* 3)
-(defconst *euc-japan* 3)
-
-(defconst lc-ascii 0)
-(defconst lc-jp 146)
+(require 'tl-nemacs)
;;; @ variables
(defvar mime/latin-lc-list
(list lc-ascii))
-
-(defun mime/char-leading-char (chr)
- (if (< chr 128)
- lc-ascii
- lc-jp))
-
-;; by mol. 1993/9/26
-(defun string-width (str)
- "Return number of columns STRING will occupy.
- [Mule compatible function in tm-nemacs]"
- (length str))
-
-(defun char-bytes (chr)
- "Return number of bytes CHAR will occupy in a buffer.
- [Mule compatible function in tm-nemacs]"
- (if (< chr 128) 1 2))
-
-(defun char-width (chr)
- "Return number of columns CHAR will occupy when displayed.
- [Mule compatible function in tm-nemacs]"
- (if (< chr 128) 1 2))
-
-(defun code-convert-string (str ic oc)
- "Convert code in STRING from SOURCE code to TARGET code,
-On successful converion, returns the result string,
-else returns nil. [Mule compatible function in tm-nemacs]"
- (if (not (eq ic oc))
- (convert-string-kanji-code str ic oc)
- str))
-
-(defun check-ASCII-string (str)
- (let ((i 0)
- len)
- (setq len (length str))
- (catch 'label
- (while (< i len)
- (if (>= (elt str i) 128)
- (throw 'label nil))
- (setq i (+ i 1))
- )
- str)))
;; by mol. 1993/10/4
(defun mime/convert-string-to-emacs (charset str)
;;;
-;;; $Id: tm-orig.el,v 1.1 1994/07/29 22:08:59 morioka Exp morioka $
+;;; $Id: tm-orig.el,v 5.1 1994/10/20 00:43:09 morioka Exp $
;;;
(provide 'tm-orig)
-;;; @ constants
-;;;
-(defconst lc-ascii 0)
-(defconst lc-ltn1 0)
+(require 'tl-orig)
;;; @ variables
;;; @ functions
;;;
-(defun mime/char-leading-char (chr)
- (if (< chr 128)
- lc-ascii
- lc-ltn1))
-
-(defun string-width (str) (length str))
-(defun char-bytes (chr) 1)
-(defun char-width (chr) 1)
+;; by mol. 1993/10/4
+(defun mime/convert-string-to-emacs (charset str)
+ (cond ((string-match "^US-ASCII$" charset) str)
+ ((string-match "^ISO-8859-1$" charset) str)
+ ))
+
+;; by mol. 1993/11/2
+(defun mime/convert-string-from-emacs (string charset)
+ (cond ((equal charset "US-ASCII") string)
+ ((equal charset "ISO-8859-1") string)
+ ))
(defun mime/decode-encoded-text (charset encoding str)
(if (member charset mime/decoding-charset-list)
;;;
(defconst mime/viewer-RCS-ID
- "$Id: tm-view.el,v 5.12 1994/10/17 07:28:34 morioka Exp $")
+ "$Id: tm-view.el,v 5.13 1994/10/19 15:26:16 morioka Exp $")
(defconst mime/viewer-version (get-version-string mime/viewer-RCS-ID))
)
(setq fcl (mime/make-flat-content-list cl))
(if (get-buffer obuf)
- (progn
- (switch-to-buffer obuf)
- (erase-buffer)
- ))
+ (kill-buffer obuf)
+ )
(let ((r fcl) cell cid ctype beg end e nb ne subj dest str)
(while r
(setq cell (car r))