+Wed Jun 12 05:53:26 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl: Version 7.30 was released.
+ * MEL: Version 5.5 was released.
+ * tm: Version 7.68 was released.
+
+ * tm-edit.el (mime-editor/split-message-sender-alist): setting for
+ `mail-mode' was moved to tm-rmail.el.
+
+Wed Jun 12 05:38:23 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-rmail.el: Setting for
+ `mime-editor/split-message-sender-alist' was moved from
+ tm-edit.el.
+
+Tue Jun 11 22:19:45 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-image.el: Function `image-read-file' was abolished.
+
+ * tm-image.el (mime-preview/filter-for-inline-image): New
+ implementation; Don't make temporary file.
+
+ (mime-preview/filter-for-application/postscript): New function for
+ XEmacs 19.14 or later.
+
+Tue Jun 11 14:34:28 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encode-string-1): Use function
+ `char-length' instead of `char-bytes'.
+
+ * tm-ew-e.el (tm-eword::parse-lc-word): Use function `char-length'
+ instead of `char-bytes'.
+
+Mon Jun 10 05:12:37 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encode-string-1): Use macro
+ `tm-eword::rword-charset', `tm-eword::rword-encoding' and
+ `tm-eword::rword-type'.
+
+ (tm-eword::encoded-word-length): set `type'.
+
+Mon Jun 10 04:34:27 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (mime/encode-field): set `type'.
+
+Mon Jun 10 04:29:31 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encode-rwl): optional argument `mode' was
+ abolished.
+
+ (tm-eword::encode-string): modified for new interface.
+
+ (mime-eword/encode-string): modified for new interface.
+
+Mon Jun 10 04:21:03 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encode-string-1): optional argument `mode'
+ was abolished.
+
+ (tm-eword::encode-rwl): don't use `mode'.
+
+ * tm-ew-e.el (tm-eword::split-string): New optional argument
+ `mode'.
+
+ (tm-eword::mailbox-to-rwl): set `type'.
+
+Mon Jun 10 04:10:05 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::make-rword): New macro.
+
+ (tm-eword::words-to-ruled-words): new optional argument `mode';
+ Use macro `tm-eword::make-rword'.
+
+ (tm-eword::phrase-to-rwl): set `mode'.
+
+Mon Jun 10 03:29:31 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encoded-word-length): Use macro
+ `tm-eword::rword-text', `tm-eword::rword-charset' and
+ `tm-eword::rword-encoding'.
+
+Mon Jun 10 03:12:18 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encoded-word-length): Use function
+ `base64-encoded-length' instead of `base64-length'.
+
+ Function `q-encoding-length' was abolished.
+
+Mon Jun 10 03:09:05 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::encoded-word-length): Use function
+ `base64-encoded-length' instead of `base64-length'.
+
+ Function `base64-length' was abolished.
+
+Mon Jun 10 02:59:06 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tm-ew-e.el (tm-eword::rword-text): New macro.
+ (tm-eword::rword-charset): New macro.
+ (tm-eword::rword-encoding): New macro.
+ (tm-eword::rword-type): New macro.
+
+ (tm-eword::space-process): Use macro `tm-eword::rword-text',
+ `tm-eword::rword-charset' and `tm-eword::rword-encoding'.
+
+\f
Mon Jun 10 01:56:38 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* tm: Version 7.67 was released.
FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
-TARFILE = tm7.67.tar.gz
+TARFILE = tm7.68.tar.gz
elc:
$(EMACS) $(FLAGS) -l inst-tm -f compile-tm
;;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Created: 1994/08/21 renamed from mime.el
-;;; Version: $Revision: 7.67 $
+;;; Version: $Revision: 7.68 $
;;; Keywords: mail, news, MIME, multimedia, multilingual
;;;
;;; This file is part of tm (Tools for MIME).
;;;
(defconst mime-editor/RCS-ID
- "$Id: tm-edit.el,v 7.67 1996/06/09 07:03:58 morioka Exp $")
+ "$Id: tm-edit.el,v 7.68 1996/06/12 05:53:26 morioka Exp $")
(defconst mime-editor/version (get-version-string mime-editor/RCS-ID))
"\\(^[BDFbdf]cc:\\|^cc:[ \t]*$\\)")
(defvar mime-editor/split-message-sender-alist
- '((mail-mode
- . (lambda ()
- (interactive)
- (sendmail-send-it)
- ))
- (mh-letter-mode
+ '((mh-letter-mode
. (lambda (&optional arg)
(interactive "P")
(write-region (point-min) (point-max)
;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version: $Revision: 7.21 $
+;;; Version: $Revision: 7.33 $
;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
;;;
;;; This file is part of tm (Tools for MIME).
;;;
(defconst tm-ew-e/RCS-ID
- "$Id: tm-ew-e.el,v 7.21 1996/06/06 15:03:38 morioka Exp $")
+ "$Id: tm-ew-e.el,v 7.33 1996/06/11 14:34:28 morioka Exp $")
(defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID))
(defun tm-eword::parse-lc-word (str)
(let* ((chr (sref str 0))
(lc (tm-eword::char-type chr))
- (i (char-bytes chr))
+ (i (char-length chr))
(len (length str))
)
(while (and (< i len)
(setq chr (sref str i))
(eq lc (tm-eword::char-type chr))
)
- (setq i (+ i (char-bytes chr)))
+ (setq i (+ i (char-length chr)))
)
(cons (cons lc (substring str 0 i)) (substring str i))
))
;;; @ rule
;;;
+(defmacro tm-eword::make-rword (text charset encoding type)
+ (` (list (, text)(, charset)(, encoding)(, type))))
+(defmacro tm-eword::rword-text (rword)
+ (` (car (, rword))))
+(defmacro tm-eword::rword-charset (rword)
+ (` (car (cdr (, rword)))))
+(defmacro tm-eword::rword-encoding (rword)
+ (` (car (cdr (cdr (, rword))))))
+(defmacro tm-eword::rword-type (rword)
+ (` (car (cdr (cdr (cdr (, rword)))))))
+
(defun tm-eword::find-charset-rule (lcl)
(if lcl
(let* ((charset (mime/find-charset lcl))
(list charset encoding)
)))
-(defun tm-eword::words-to-ruled-words (wl)
+(defun tm-eword::words-to-ruled-words (wl &optional mode)
(mapcar (function
(lambda (word)
- (cons (cdr word) (tm-eword::find-charset-rule (car word)))
- ))
+ (let ((ret (tm-eword::find-charset-rule (car word))))
+ (tm-eword::make-rword (cdr word) (car ret)(nth 1 ret) mode)
+ )))
wl))
(defun tm-eword::space-process (seq)
(setq b (car seq))
(setq seq (cdr seq))
(setq c (car seq))
- (setq cc (nth 1 c))
- (if (null (nth 1 b))
+ (setq cc (tm-eword::rword-charset c))
+ (if (null (tm-eword::rword-charset b))
(progn
(setq a (car prev))
- (setq ac (nth 1 a))
- (if (and (nth 2 a)(nth 2 c))
+ (setq ac (tm-eword::rword-charset a))
+ (if (and (tm-eword::rword-encoding a)
+ (tm-eword::rword-encoding c))
(cond ((equal ac cc)
(setq prev (cons
(cons (concat (car a)(car b)(car c))
(reverse prev)
))
-(defun tm-eword::split-string (str)
+(defun tm-eword::split-string (str &optional mode)
(tm-eword::space-process
- (tm-eword::words-to-ruled-words
- (tm-eword::lc-words-to-words
- (tm-eword::split-to-lc-words str)
- ))))
+ (tm-eword::words-to-ruled-words (tm-eword::lc-words-to-words
+ (tm-eword::split-to-lc-words str))
+ mode)))
;;; @ length
;;;
-(defun base64-length (string)
- (let ((l (length string)))
- (* (+ (/ l 3)
- (if (= (mod l 3) 0) 0 1)
- ) 4)
- ))
-
-(defun q-encoding-length (string)
- (let ((l 0)(i 0)(len (length string)) chr)
- (while (< i len)
- (setq chr (elt string i))
- (if (string-match "[A-Za-z0-9!*+/=_---]" (char-to-string chr))
- (setq l (+ l 1))
- (setq l (+ l 3))
- )
- (setq i (+ i 1)) )
- l))
-
(defun tm-eword::encoded-word-length (rword)
- (let ((charset (nth 1 rword))
- (encoding (nth 2 rword))
- (string (car rword))
+ (let ((string (tm-eword::rword-text rword))
+ (charset (tm-eword::rword-charset rword))
+ (encoding (tm-eword::rword-encoding rword))
ret)
(setq ret
(cond ((equal encoding "B")
(setq string (mime-charset-encode-string string charset))
- (base64-length string)
+ (base64-encoded-length string)
)
((equal encoding "Q")
(setq string (mime-charset-encode-string string charset))
- (q-encoding-length string)
+ (q-encoding-encoded-length string
+ (tm-eword::rword-type rword))
)))
(if ret
(cons (+ 7 (length charset) ret) string)
;;; @ encode-string
;;;
-(defun tm-eword::encode-string-1 (column rwl &optional mode)
+(defun tm-eword::encode-string-1 (column rwl)
(let* ((rword (car rwl))
(ret (tm-eword::encoded-word-length rword))
string len)
)
(setq string
(tm-eword::encode-encoded-text
- (nth 1 rword) (nth 2 rword) (cdr ret)
+ (tm-eword::rword-charset rword)
+ (tm-eword::rword-encoding rword)
+ (cdr ret)
+ (tm-eword::rword-type rword)
))
(setq len (+ (length string) column))
(setq rwl (cdr rwl))
(str "") nstr)
(while (and (< p len)
(progn
- (setq np (+ p (char-bytes (sref string p))))
+ (setq np (+ p (char-length (sref string p))))
(setq nstr (substring string 0 np))
(setq ret (tm-eword::encoded-word-length
(cons nstr (cdr rword))
(cdr rwl)))
(setq string
(tm-eword::encode-encoded-text
- (nth 1 rword) (nth 2 rword) str))
+ (tm-eword::rword-charset rword)
+ (tm-eword::rword-encoding rword)
+ str
+ (tm-eword::rword-type rword)))
(setq len (+ (length string) column))
)
)))
(list string len rwl)
))
-(defun tm-eword::encode-rwl (column rwl &optional mode)
+(defun tm-eword::encode-rwl (column rwl)
(let (ret dest ps special str ew-f pew-f)
(while rwl
(setq ew-f (nth 2 (car rwl)))
pew-f nil)
(setq pew-f ew-f)
)
- (setq ret (tm-eword::encode-string-1 column rwl mode))
+ (setq ret (tm-eword::encode-string-1 column rwl))
(setq str (car ret))
(if (eq (elt str 0) ?\n)
(if (eq special ?\()
(progn
(setq dest (concat dest "\n ("))
- (setq ret (tm-eword::encode-string-1 2 rwl mode))
+ (setq ret (tm-eword::encode-string-1 2 rwl))
(setq str (car ret))
))
(cond ((eq special 32)
))
(defun tm-eword::encode-string (column str &optional mode)
- (tm-eword::encode-rwl column (tm-eword::split-string str) mode)
+ (tm-eword::encode-rwl column (tm-eword::split-string str mode))
)
(setq dest
(append dest
(list
- (cons str (tm-eword::find-charset-rule
- (find-charset-string str)))
+ (let ((ret (tm-eword::find-charset-rule
+ (find-charset-string str))))
+ (tm-eword::make-rword
+ str (car ret)(nth 1 ret) 'phrase)
+ )
)))
)
((eq type 'comment)
'(("(" nil nil))
(tm-eword::words-to-ruled-words
(tm-eword::lc-words-to-words
- (tm-eword::split-to-lc-words (cdr token))))
+ (tm-eword::split-to-lc-words (cdr token)))
+ 'comment)
'((")" nil nil))
))
)
(tm-eword::words-to-ruled-words
(tm-eword::lc-words-to-words
(tm-eword::split-to-lc-words (cdr token))
- ))))
+ ) 'phrase)))
))
(setq phrase (cdr phrase))
)
(append dest
'((" " nil nil)
("(" nil nil))
- (tm-eword::split-string comment)
+ (tm-eword::split-string comment 'comment)
'((")" nil nil))
)))
dest))
(setq r (cdr r))
))
(car (tm-eword::encode-string
- (+ (length field-name) 1) field-body))
+ (+ (length field-name) 1)
+ field-body 'text))
))
))
(concat field-name ": " ret)
)))
(defun mime-eword/encode-string (str &optional column mode)
- (car (tm-eword::encode-rwl (or column 0)
- (tm-eword::split-string str) mode))
+ (car (tm-eword::encode-rwl (or column 0) (tm-eword::split-string str mode)))
)
;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Created: 1995/12/15
;;; Version:
-;;; $Id: tm-image.el,v 7.5 1996/05/27 08:08:00 morioka Exp $
+;;; $Id: tm-image.el,v 7.8 1996/06/12 05:22:11 morioka Exp $
;;;
;;; Keywords: mail, news, MIME, multimedia, image, picture
;;;
"image/x-mag" (function mime-preview/filter-for-image))
(defvar tm-image/inline-image-types
- '("image/jpeg" "image/gif" "image/tiff"
- "image/x-tiff" "image/x-pic" "image/x-mag"
- "image/x-xbm" "image/x-xpixmap"))
+ (if (featurep 'gif)
+ (nconc
+ '("image/jpeg" "image/gif" "image/tiff"
+ "image/x-tiff" "image/x-pic" "image/x-mag"
+ "image/x-xbm" "image/x-xpixmap")
+ (if (featurep 'gif)
+ '("application/postscript")
+ )
+ )))
(defun bitmap-read-xbm (file)
(let (gl)
("image/x-xpixmap" . xpm)
))
- (defun image-read-file (ctype file)
- (let ((minor (assoc-value ctype mime-viewer/image-converter-alist))
- gl)
- (while (progn
- (setq gl (make-glyph (vector minor :file file)))
- (eq (image-instance-type (glyph-image-instance gl))
- 'text)
- ))
- (make-annotation gl (point) 'text)
- ))
-
(defvar mime-viewer/use-highlight-headers t)
(defvar mime-preview/x-face-function
)))
+;;; @ content filter for xbm
+;;;
+
+(defun mime-preview/filter-for-image/xbm (ctype params encoding)
+ (let* ((mode mime::preview/original-major-mode)
+ (m (assq mode mime-viewer/code-converter-alist))
+ (charset (assoc "charset" params))
+ (beg (point-min)) (end (point-max))
+ (xbm-file (make-temp-name (expand-file-name "tm" mime/tmp-dir)))
+ )
+ (remove-text-properties beg end '(face nil))
+ (mime-decode-region beg end encoding)
+ (write-region (point-min)(point-max) xbm-file)
+ (delete-region (point-min)(point-max))
+ (bitmap-read-xbm xbm-file)
+ (delete-file xbm-file)
+ ))
+
+(set-alist 'mime-viewer/content-filter-alist
+ "image/xbm" (function mime-preview/filter-for-image/xbm))
+
+(set-alist 'mime-viewer/content-filter-alist
+ "image/x-xbm" (function mime-preview/filter-for-image/xbm))
+
+
;;; @ content filter for support in-line image types
;;;
;; (for XEmacs 19.14 or later)
(defun mime-preview/filter-for-inline-image (ctype params encoding)
(let* ((mode mime::preview/original-major-mode)
- (m (assq mode mime-viewer/code-converter-alist))
- (charset (assoc "charset" params))
- (beg (point-min)) (end (point-max))
- (image-file (make-temp-name (expand-file-name "tm" mime/tmp-dir)))
- )
+ (m (assq mode mime-viewer/code-converter-alist))
+ (charset (assoc "charset" params))
+ (beg (point-min)) (end (point-max))
+ )
(remove-text-properties beg end '(face nil))
(mime-decode-region beg end encoding)
- (write-region (point-min)(point-max) image-file)
- (delete-region (point-min)(point-max))
- (image-read-file ctype image-file)
- (delete-file image-file)
+ (let ((data (buffer-string))
+ (minor (assoc-value ctype mime-viewer/image-converter-alist))
+ gl)
+ (delete-region (point-min)(point-max))
+ (while (progn
+ (setq gl (make-glyph (vector minor :data data)))
+ (eq (image-instance-type (glyph-image-instance gl))
+ 'text)
+ ))
+ (make-annotation gl (point) 'text)
+ )
(insert "\n")
))
-;;; @ content filter for xbm
+;;; @ content filter for Postscript
;;;
+;; (for XEmacs 19.14 or later)
-(defun mime-preview/filter-for-image/xbm (ctype params encoding)
+(defun mime-preview/filter-for-application/postscript (ctype params encoding)
(let* ((mode mime::preview/original-major-mode)
(m (assq mode mime-viewer/code-converter-alist))
- (charset (assoc "charset" params))
(beg (point-min)) (end (point-max))
- (xbm-file (make-temp-name (expand-file-name "tm" mime/tmp-dir)))
+ (file-base (make-temp-name (expand-file-name "tm" mime/tmp-dir)))
+ (ps-file (concat file-base ".ps"))
+ (gif-file (concat file-base ".gif"))
)
(remove-text-properties beg end '(face nil))
(mime-decode-region beg end encoding)
- (write-region (point-min)(point-max) xbm-file)
+ (write-region (point-min)(point-max) ps-file)
(delete-region (point-min)(point-max))
- (bitmap-read-xbm xbm-file)
- (delete-file xbm-file)
+ (call-process "pstogif" nil nil nil ps-file)
+ (let (gl)
+ (while (progn
+ (setq gl (make-glyph (vector 'gif :file gif-file)))
+ (eq (image-instance-type (glyph-image-instance gl))
+ 'text)
+ ))
+ (make-annotation gl (point) 'text)
+ )
+ (delete-file ps-file)
+ (delete-file gif-file)
))
(set-alist 'mime-viewer/content-filter-alist
- "image/xbm" (function mime-preview/filter-for-image/xbm))
-
-(set-alist 'mime-viewer/content-filter-alist
- "image/x-xbm" (function mime-preview/filter-for-image/xbm))
+ "application/postscript"
+ (function mime-preview/filter-for-application/postscript))
;;; @ setting
;;;
;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; modified by KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
;;; Created: 1994/8/30
;;; Version:
-;;; $Revision: 7.24 $
+;;; $Revision: 7.25 $
;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word
;;;
;;; This file is part of tm (Tools for MIME).
;;;
(defconst tm-rmail/RCS-ID
- "$Id: tm-rmail.el,v 7.24 1996/04/16 18:24:58 morioka Exp $")
+ "$Id: tm-rmail.el,v 7.25 1996/06/12 05:38:23 morioka Exp $")
(defconst tm-rmail/version (get-version-string tm-rmail/RCS-ID))
(defvar tm-rmail/decode-all nil)
(require 'tm-mail)
(set-alist 'mime-editor/message-inserter-alist
'mail-mode (function tm-mail/insert-message))
+ (set-alist 'mime-editor/split-message-sender-alist
+ 'mail-mode (function
+ (lambda ()
+ (interactive)
+ (sendmail-send-it)
+ )))
)))
)))