--- /dev/null
+* tl
+
+ Attached version 6.6.8.
+
+ - tl-822.el was created as new RFC 822 parser.
+ - tl-cite.el was created as a citation utility.
+
+
+* tm
+
+tm/mime-setup.el
+----------------------------
+revision 7.0
+date: 1995/10/03 04:27:39; author: morioka; state: Exp; lines: +12 -4
+tm-eword.el was used instead of tiny-mime.el.
+----------------------------
+
+tm/tm-def.el
+----------------------------
+revision 6.9
+date: 1995/10/03 04:30:57; author: morioka; state: Exp; lines: +2 -2
+Function `tm:browse-url' was modified to call variable
+`tm:mother-button-dispatcher' interactively.
+----------------------------
+
+tm/tm-ew-d.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:34:26; author: morioka; state: Exp; lines: +24 -33
+It was separated from tiny-mime.el as MIME encoded-word decoder. A lot
+of parts were changed.
+----------------------------
+
+tm/tm-ew-e.el
+----------------------------
+revision 7.0
+date: 1995/10/03 04:35:11; author: morioka; state: Exp;
+It was created as MIME encoded-word encoder. It was wrote from scratch.
+----------------------------
+
+tm/tm-eword.el
+----------------------------
+revision 7.0
+date: 1995/10/03 04:40:06; author: morioka; state: Exp; lines: +28 -549
+(1) tiny-mime.el was renamed to tm-eword.el.
+(2) decoder was moved to tm-ew-d.el.
+(3) major parts of encoder were erased, tm-ew-e.el was used.
+----------------------------
+
+tm/tm-mule.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:49:53; author: morioka; state: Exp; lines: +11 -1
+comment was modified.
+----------------------------
+revision 7.0
+date: 1995/10/03 04:44:11; author: morioka; state: Exp; lines: +59 -24
+Definitions for tm-ew-e.el were added.
+----------------------------
+
+tm/tm-nemacs.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:51:07; author: morioka; state: Exp; lines: +11 -1
+comment was modified.
+----------------------------
+revision 7.0
+date: 1995/10/03 04:44:50; author: morioka; state: Exp; lines: +11 -1
+Definitions for tm-ew-e.el were added.
+----------------------------
+
+tm/tm-orig.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:52:16; author: morioka; state: Exp; lines: +11 -1
+comment was modified.
+----------------------------
+revision 7.0
+date: 1995/10/03 04:45:50; author: morioka; state: Exp; lines: +13 -3
+Definitions for tm-ew-e.el were added.
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.9
+date: 1995/10/03 04:56:10; author: morioka; state: Exp; lines: +2 -5
+tm-eword.el was used instead of tiny-mime.el.
+----------------------------
+revision 7.8
+date: 1995/09/26 16:04:39; author: morioka; state: Exp; lines: +5 -2
+In function `mime-viewer/display-content', problems of getting subject
+was fixed.
+----------------------------
+revision 7.7
+date: 1995/09/26 14:49:23; author: morioka; state: Exp; lines: +2 -1
+In function `mime-viewer/display-content', problem of single-part
+message which has hidden body was fixed.
+----------------------------
+
+tm/tm-rmail.el
+----------------------------
+revision 6.7
+date: 1995/09/28 06:05:20; author: morioka; state: Exp; lines: +18 -10
+encoded-word decoder was set to variable `rmail-message-filter' again.
+----------------------------
+
+tm/tm-vm.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:04:35; author: morioka; state: Exp; lines: +22 -9
+Comment was modified because tm-eword.el was used instead of
+tiny-mime.el.
+----------------------------
+
+
+* tm/gnus
+
+ Version 7.0 \e$B$rE:IU$7$?!#\e(B
+
+tm/gnus/tm-gnus.el
+----------------------------
+revision 6.5
+date: 1995/09/28 02:20:46; author: morioka; state: Exp; lines: +9 -9
+modified to support ``Gnus 5.* with September patch''.
+----------------------------
+
+tm/gnus/tm-gnus5.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:07:54; author: morioka; state: Exp; lines: +31 -22
+tm-eword.el was used instead of tiny-mime.el.
+----------------------------
+
+tm/gnus/tm-ognus.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:08:59; author: morioka; state: Exp; lines: +20 -5
+tm-eword.el was used instead of tiny-mime.el.
+----------------------------
+
+tm/gnus/tm-sgnus.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:09:53; author: morioka; state: Exp; lines: +27 -14
+tm-eword.el was used instead of tiny-mime.el.
+----------------------------
--- /dev/null
+* tl
+
+ Version 6.6.8 \e$B$rE:IU$7$?!#\e(B
+
+ - \e$B?7$7$$\e(B tl-822.el \e$B$r:n@.$7$?!#\e(B
+ - citation \e$BMQ$N\e(B utility \e$B$H$7$F\e(B tl-cite.el \e$B$r:n@.$7$?!#\e(B
+
+
+* tm
+
+tm/mime-setup.el
+----------------------------
+revision 7.0
+date: 1995/10/03 04:27:39; author: morioka; state: Exp; lines: +12 -4
+tiny-mime.el \e$B$r;H$&$N$r$d$a$F!"\e(Btm-eword.el \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/tm-def.el
+----------------------------
+revision 6.9
+date: 1995/10/03 04:30:57; author: morioka; state: Exp; lines: +2 -2
+\e$BJQ?t\e(B tm:mother-button-dispatcher \e$B$r\e(B interactive \e$B$K8F$V$h$&$K4X?t\e(B
+tm:browse-url \e$B$r=$@5$7$?!#\e(B
+----------------------------
+
+tm/tm-ew-d.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:34:26; author: morioka; state: Exp; lines: +24 -33
+MIME encoded-word decoder \e$B$H$7$F\e(B tiny-mime.el \e$B$+$iJ,N%$7!"BgI}$K=q$-D>\e(B
+\e$B$7$?!#\e(B
+----------------------------
+
+tm/tm-ew-e.el
+----------------------------
+revision 7.0
+date: 1995/10/03 04:35:11; author: morioka; state: Exp;
+MIME encoded-word encoder \e$B$H$7$F?7@_$7$?!#\e(Bencoder \e$B$OA4LLE*$K=q$-D>$5$l\e(B
+\e$B$F$$$k!#\e(B
+----------------------------
+
+tm/tm-eword.el
+----------------------------
+revision 7.0
+date: 1995/10/03 04:40:06; author: morioka; state: Exp; lines: +28 -549
+(1) tiny-mime.el \e$B$r\e(B tm-eword.el \e$B$K2~L>$7$?!#\e(B
+(2) decoder \e$B$r\e(B tm-ew-d.el \e$B$K0\$7$?!#\e(B
+(3) encoder \e$B$NBgItJ,$r:o=|$7!"\e(Btm-ew-e.el \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/tm-mule.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:49:53; author: morioka; state: Exp; lines: +11 -1
+comment \e$B$r=$@5$7$?!#\e(B
+----------------------------
+revision 7.0
+date: 1995/10/03 04:44:11; author: morioka; state: Exp; lines: +59 -24
+tm-ew-e.el \e$BMQ$NDj5A$rDI2C$7$?!#\e(B
+----------------------------
+
+tm/tm-nemacs.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:51:07; author: morioka; state: Exp; lines: +11 -1
+comment \e$B$r=$@5$7$?!#\e(B
+----------------------------
+revision 7.0
+date: 1995/10/03 04:44:50; author: morioka; state: Exp; lines: +11 -1
+tm-ew-e.el \e$BMQ$NDj5A$rDI2C$7$?!#\e(B
+----------------------------
+
+tm/tm-orig.el
+----------------------------
+revision 7.1
+date: 1995/10/03 04:52:16; author: morioka; state: Exp; lines: +11 -1
+comment \e$B$r=$@5$7$?!#\e(B
+----------------------------
+revision 7.0
+date: 1995/10/03 04:45:50; author: morioka; state: Exp; lines: +13 -3
+tm-ew-e.el \e$BMQ$NDj5A$rDI2C$7$?!#\e(B
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.9
+date: 1995/10/03 04:56:10; author: morioka; state: Exp; lines: +2 -5
+tiny-mime.el \e$B$r;H$&$N$r$d$a$F!"\e(Btm-ew-d.el \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+revision 7.8
+date: 1995/09/26 16:04:39; author: morioka; state: Exp; lines: +5 -2
+\e$B4X?t\e(B mime-viewer/display-content \e$B$K$*$$$F!"\e(Bsubject \e$B$r<h$kItJ,$NIT6q9g\e(B
+\e$B$r=$@5$7$?!#\e(B
+----------------------------
+revision 7.7
+date: 1995/09/26 14:49:23; author: morioka; state: Exp; lines: +2 -1
+body \e$B$,1#$5$l$?\e(B single-part \e$B$N\e(B message \e$B$N>l9g$N4X?t\e(B
+mime-viewer/display-content \e$B$NIT6q9g$r=$@5$7$?!#\e(B
+----------------------------
+
+tm/tm-rmail.el
+----------------------------
+revision 6.7
+date: 1995/09/28 06:05:20; author: morioka; state: Exp; lines: +18 -10
+encoded-word \e$B$N\e(B decode \e$B$O$d$C$Q$jJQ?t\e(B rmail-message-filter \e$B$K@_Dj$9$k\e(B
+\e$B$3$H$K$7$?!#\e(B
+----------------------------
+
+tm/tm-vm.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:04:35; author: morioka; state: Exp; lines: +22 -9
+tiny-mime.el \e$B$r;H$&$N$r$d$a$F\e(B tm-ew-e.el \e$B$r;H$&$3$H$K$J$C$?$N$KH<$$!"\e(B
+comment \e$B$r=$@5$7$?!#\e(B
+----------------------------
+
+
+* tm/gnus
+
+ Version 7.0 \e$B$rE:IU$7$?!#\e(B
+
+tm/gnus/tm-gnus.el
+----------------------------
+revision 6.5
+date: 1995/09/28 02:20:46; author: morioka; state: Exp; lines: +9 -9
+``Gnus 5.* with September patch'' \e$B$KBP1~$7$?!#\e(B
+----------------------------
+
+tm/gnus/tm-gnus5.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:07:54; author: morioka; state: Exp; lines: +31 -22
+tiny-mime.el \e$B$r;H$&$N$r$d$a$F\e(B tm-ew-d.el \e$B$r;H$&$3$H$K$7$?!#\e(B
+----------------------------
+
+tm/gnus/tm-ognus.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:08:59; author: morioka; state: Exp; lines: +20 -5
+tiny-mime.el \e$B$r;H$&$N$r$d$a$F\e(B tm-ew-d.el \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/gnus/tm-sgnus.el
+----------------------------
+revision 7.0
+date: 1995/10/03 05:09:53; author: morioka; state: Exp; lines: +27 -14
+tiny-mime.el \e$B$r;H$&$N$r$d$a$F\e(B tm-ew-d.el \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
#
-# $Id: Makefile,v 7.0 1995/09/26 12:36:27 morioka Exp morioka $
+# $Id: Makefile,v 7.1 1995/10/03 05:14:34 morioka Exp morioka $
#
include config.tm
TM_FILES = tm/README.eng tm/rel-*.ol tm/Changes* \
tm/config.tm tm/Makefile tm/mk-tm \
- tm/tm-view.el tm/tiny-mime.el \
- tm/tm-parse.el tm/tm-play.el \
tm/tm-mule.el tm/tm-nemacs.el tm/tm-orig.el tm/tm-def.el \
+ tm/tm-eword.el tm/tm-ew-d.el tm/tm-ew-e.el \
+ tm/tm-view.el tm/tm-parse.el tm/tm-play.el \
tm/tm-ftp.el tm/tm-latex.el tm/tm-w3.el tm/tm-partial.el \
tm/tm-tar.el \
tm/tm-rich.el tm/richtext.el tm/tinyrich.el \
FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
-TARFILE = tm7.06.tar
+TARFILE = tm7.09.tar
nemacs:
FILES = tm/gnus/*.el tm/doc/tm-gnus*.texi
-TARFILE = tm-gnus6.24.tar
+TARFILE = tm-gnus7.00.tar
gnus3:
;;
;; please edit this
;;
- '("/usr/local/lib/emacs/site-lisp/gnus-5.0/lisp")
+ '("/usr/local/lib/emacs/site-lisp/gnus-5.0.6/lisp")
;;
load-path))
(require 'gnus)
(require 'tm-view)
(princ (format "%s\n" gnus-version))
- (cond ((string-match "GNUS 3" gnus-version)
- (byte-compile-file "tm-gnus3.el")
+ (cond ((boundp 'gnus-original-article-buffer)
+ (byte-compile-file "tm-sgnus.el")
)
- ((string-match "GNUS 4" gnus-version)
- (byte-compile-file "tm-gnus4.el")
+ ((string-match "Gnus v5\\|September Gnus" gnus-version)
+ (byte-compile-file "tm-gnus5.el")
)
((string-match "(ding)" gnus-version)
(require 'tm-dgnus)
(byte-compile-file "tm-dgnus.el")
(byte-compile-file "tm-gnus5.el")
)
- ((string-match "Gnus v5" gnus-version)
- (byte-compile-file "tm-gnus5.el")
+ ((string-match "GNUS 4" gnus-version)
+ (byte-compile-file "tm-gnus4.el")
)
- ((string-match "September Gnus" gnus-version)
- (byte-compile-file "tm-sgnus.el")
+ ((string-match "GNUS 3" gnus-version)
+ (byte-compile-file "tm-gnus3.el")
))
(byte-compile-file "tm-gnus.el")
)
;;;
;;; Author: Morioka Tomohiko <morioka@jaist.ac.jp>
;;; Version:
-;;; $Id: tm-gnus.el,v 6.4 1995/09/24 20:22:40 morioka Exp $
+;;; $Id: tm-gnus.el,v 6.5 1995/09/28 02:20:46 morioka Exp $
;;; Keywords: news, MIME, multimedia, encoded-word, multilingual
;;;
;;; This file is part of tm (Tools for MIME).
;;; @ set up
;;;
-(cond ((string-match "^GNUS [0-3]" gnus-version)
- (require 'tm-gnus3)
+(cond ((boundp 'gnus-original-article-buffer)
+ (require 'tm-sgnus)
)
- ((string-match "^GNUS 4" gnus-version)
- (require 'tm-gnus4)
+ ((string-match "^\\(Gnus v5\\|September Gnus\\)" gnus-version)
+ (require 'tm-gnus5)
)
((string-match "(ding)" gnus-version)
(require 'tm-dgnus)
)
- ((string-match "^Gnus v5" gnus-version)
- (require 'tm-gnus5)
+ ((string-match "^GNUS 4" gnus-version)
+ (require 'tm-gnus4)
)
- ((string-match "^September Gnus" gnus-version)
- (require 'tm-sgnus)
+ ((string-match "^GNUS [0-3]" gnus-version)
+ (require 'tm-gnus3)
))
;;;
-;;; tm-gnus5.el --- tm-gnus module for GNUS 5.*
+;;; tm-gnus5.el --- tm-gnus module for Gnus 5.*
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'tl-str)
(require 'tl-misc)
(require 'gnus)
+(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
+(autoload 'mime/decode-message-header
+ "tm-ew-d" "Decode MIME encoded-word." t)
+(autoload 'mime/decode-encoded-words-string
+ "tm-ew-d" "Decode MIME encoded-word." t)
+
;;; @ version
;;;
(defconst tm-gnus/RCS-ID
- "$Id: tm-gnus5.el,v 6.22 1995/09/11 07:41:23 morioka Exp $")
+ "$Id: tm-gnus5.el,v 7.0 1995/10/03 05:07:54 morioka Exp $")
(defconst tm-gnus/version
(concat (get-version-string tm-gnus/RCS-ID) " for GNUS 5"))
)
-;;; @ autoload
-;;;
-
-(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
-(autoload 'mime/decode-message-header
- "tiny-mime" "Decode MIME encoded-word." t)
-(autoload 'mime/decode-string "tiny-mime" "Decode MIME encoded-word." t)
-
-
;;; @ variables
;;;
;;;
(defun tm-gnus/decode-summary-from-and-subjects ()
- (mapcar (function
- (lambda (header)
- (mail-header-set-from
- header
- (mime/decode-string (or (mail-header-from header) ""))
- )
- (mail-header-set-subject
- header
- (mime/decode-string (or (mail-header-subject header) ""))
- )
- ))
+ (mapcar (lambda (header)
+ (let ((from (mail-header-from header))
+ (subj (mail-header-subject header))
+ )
+ (mail-header-set-from
+ header
+ (if from
+ (mime/decode-encoded-words-string from)
+ ""))
+ (mail-header-set-subject
+ header
+ (if subj
+ (mime/decode-encoded-words-string subj)
+ ""))
+ ))
gnus-newsgroup-headers)
)
;;;
-;;; tm-gnus.el --- tm-gnus module for GNUS 3.* and 4.*
+;;; tm-ognus.el --- tm-gnus module for GNUS 3.* and 4.*
;;;
-;;; $Id: tm-ognus.el,v 6.8 1995/09/02 07:40:13 morioka Exp $
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-ognus.el,v 7.0 1995/10/03 05:08:59 morioka Exp $
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'emu)
-(require 'tiny-mime)
(require 'gnus)
+(autoload 'mime/decode-message-header
+ "tm-ew-d" "Decode MIME encoded-word." t)
+(autoload 'mime/decode-encoded-words-string
+ "tm-ew-d" "Decode MIME encoded-word." t)
+
(defvar tm-gnus/decoding-mode t "*Decode MIME header if non-nil.")
(let ((maxlen 15) ;Maximum subject length
(subject
(if gnus-current-headers
- (mime/decode-string (nntp-header-subject gnus-current-headers))
+ (mime/decode-encoded-words-string
+ (nntp-header-subject gnus-current-headers))
"")
))
;; The value must be a string to escape %-constructs because of subject.
(mapcar (function
(lambda (header)
(let ((subj (or (gnus-header-subject header) "")))
- (nntp-set-header-subject header (mime/decode-string subj))
+ (nntp-set-header-subject
+ header
+ (mime/decode-encoded-words-string subj))
)))
gnus-newsgroup-headers)
)
;;;
;;; tm-sgnus.el --- tm-gnus module for September GNUS
;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
+;;;
(require 'tl-str)
(require 'tl-list)
;;;
(defconst tm-gnus/RCS-ID
- "$Id: tm-sgnus.el,v 6.24 1995/09/26 12:08:35 morioka Exp $")
+ "$Id: tm-sgnus.el,v 7.0 1995/10/03 05:09:53 morioka Exp $")
(defconst tm-gnus/version
(concat (get-version-string tm-gnus/RCS-ID) " for September"))
(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
(autoload 'mime/decode-message-header
- "tiny-mime" "Decode MIME encoded-word." t)
-(autoload 'mime/decode-string "tiny-mime" "Decode MIME encoded-word." t)
+ "tm-ew-d" "Decode MIME encoded-words in message header." t)
+(autoload 'mime/decode-encoded-words-string
+ "tm-ew-d" "Decode MIME encoded-words in string." t)
;;; @ variables
;;;
(defun tm-gnus/decode-summary-from-and-subjects ()
- (mapcar (function
- (lambda (header)
- (mail-header-set-from
- header
- (mime/decode-string (or (mail-header-from header) ""))
- )
- (mail-header-set-subject
- header
- (mime/decode-string (or (mail-header-subject header) ""))
- )
- ))
+ (mapcar (lambda (header)
+ (let ((from (mail-header-from header))
+ (subj (mail-header-subject header))
+ )
+ (mail-header-set-from
+ header
+ (if from
+ (mime/decode-encoded-words-string from)
+ ""))
+ (mail-header-set-subject
+ header
+ (if subj
+ (mime/decode-encoded-words-string subj)
+ ""))
+ ))
gnus-newsgroup-headers)
)
;;;
-;;; mime-setup: setup file to use tm and mime.el.
+;;; mime-setup.el --- setup file to use tm and mime.el.
;;;
-;;; $Id: mime-setup.el,v 6.2 1995/09/06 10:07:26 morioka Exp $
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: mime-setup.el,v 7.0 1995/10/03 04:27:39 morioka Exp $
+;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'tm-setup)
))
-;;; @ for tiny-mime
+;;; @ for encoded-word
;;;
-(autoload 'mime/encode-message-header "tiny-mime"
+(autoload 'mime/encode-message-header "tm-eword"
"convert message header to MIME style." t)
(add-hook 'mime-translate-hook (function mime/encode-message-header))
;;; -*-Emacs-Lisp-*-
;;;
-;;; $Id: mk-tm,v 4.0 1995/09/26 12:35:39 morioka Exp morioka $
+;;; $Id: mk-tm,v 5.0 1995/10/03 05:13:18 morioka Exp morioka $
;;;
(setq load-path (append
"tm-orig"
))
'("signature"
- "tiny-mime" "tm-def" "tm-parse" "tm-view" "tm-play"
+ "tm-def"
+ "tm-ew-d" "tm-ew-e" "tm-eword"
+ "tm-parse" "tm-view" "tm-play"
"tm-latex" "tm-w3" "tm-tar"
"tm-rmail" "tm-comp"
"tm-setup" "mime-setup"
;;;
(defconst mime/composer-RCS-ID
- "$Id: tm-comp.el,v 6.11 1995/09/04 00:47:37 morioka Exp $")
+ "$Id: tm-comp.el,v 6.12 1995/09/28 03:56:17 morioka Exp $")
(defconst mime/composer-version (get-version-string mime/composer-RCS-ID))
;;;
(defun message/get-header-string-except (pat boundary)
- (save-excursion
- (save-restriction
- (narrow-to-region (goto-char (point-min))
- (progn
- (re-search-forward
- (concat "^\\(" (regexp-quote boundary) "\\)?$")
- nil t)
- (match-beginning 0)
- ))
- (goto-char (point-min))
- (let (field header)
- (while (re-search-forward message/field-regexp nil t)
- (setq field (buffer-substring (match-beginning 0)
- (match-end 0)
- ))
- (if (not (string-match pat field))
- (setq header (concat header field "\n"))
- ))
- header)
- )))
+ (let ((case-fold-search t))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region (goto-char (point-min))
+ (progn
+ (re-search-forward
+ (concat "^\\(" (regexp-quote boundary) "\\)?$")
+ nil t)
+ (match-beginning 0)
+ ))
+ (goto-char (point-min))
+ (let (field header)
+ (while (re-search-forward message/field-regexp nil t)
+ (setq field (buffer-substring (match-beginning 0)
+ (match-end 0)
+ ))
+ (if (not (string-match pat field))
+ (setq header (concat header field "\n"))
+ ))
+ header)
+ ))))
(defun replace-space-with-underline (str)
(mapconcat (function
)
+;;; @ end
+;;;
+
(provide 'tm-comp)
(run-hooks 'tm-comp-load-hook)
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Version:
-;;; $Id: tm-def.el,v 6.7 1995/09/25 22:21:48 morioka Exp $
+;;; $Id: tm-def.el,v 6.9 1995/10/03 04:30:57 morioka Exp $
;;; Keywords: mail, news, MIME, multimedia, definition
;;;
;;; This file is part of tm (Tools for MIME).
;;;
(require 'emu)
+(require 'tl-header)
;;; @ variables
(if (fboundp browse-url-browser-function)
(call-interactively browse-url-browser-function)
(if (fboundp tm:mother-button-dispatcher)
- (funcall tm:mother-button-dispatcher event)
+ (call-interactively tm:mother-button-dispatcher)
)
))
--- /dev/null
+;;;
+;;; tm-ew-d.el --- RFC 1522 based multilingual MIME message header
+;;; decoder for GNU Emacs
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1992 ENAMI Tsugutomo
+;;; Copyright (C) 1993,1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: ENAMI Tsugutomo <enami@sys.ptg.sony.co.jp>
+;;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-ew-d.el,v 7.1 1995/10/03 04:34:26 morioka Exp $
+;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
+;;;
+
+(require 'emu)
+(require 'mel)
+(require 'tm-def)
+
+
+;;; @ MIME encoded-word definition
+;;;
+
+(defconst mime/encoded-text-regexp "[!->@-~]+")
+(defconst mime/encoded-word-regexp (concat (regexp-quote "=?")
+ "\\("
+ mime/charset-regexp
+ "\\)"
+ (regexp-quote "?")
+ "\\(B\\|Q\\)"
+ (regexp-quote "?")
+ "\\("
+ mime/encoded-text-regexp
+ "\\)"
+ (regexp-quote "?=")))
+
+
+;;; @ for string
+;;;
+
+(defun mime/decode-encoded-words-string (str)
+ (let ((dest "")(ew nil)
+ beg end)
+ (while (setq beg (string-match mime/encoded-word-regexp str))
+ (if (> beg 0)
+ (if (not (and (eq ew t) (string= (substring str 0 beg) " ")))
+ (setq dest (concat dest (substring str 0 beg)
+ ))
+ )
+ )
+ (setq end (match-end 0))
+ (setq dest (concat dest
+ (mime/decode-encoded-word (substring str beg end))
+ ))
+ (setq str (substring str end))
+ (setq ew t)
+ )
+ (concat dest str)
+ ))
+
+
+;;; @ for region
+;;;
+
+(defun mime/decode-encoded-words-region (beg end &optional unfolding)
+ (interactive "*r")
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (if unfolding
+ (mime/unfolding)
+ )
+ (goto-char (point-min))
+ (while (re-search-forward
+ (concat (regexp-quote "?=") "\\s +" (regexp-quote "=?"))
+ nil t)
+ (replace-match "?==?")
+ )
+ (goto-char (point-min))
+ (let (charset encoding text)
+ (while (re-search-forward mime/encoded-word-regexp nil t)
+ (insert (mime/decode-encoded-word
+ (prog1
+ (buffer-substring (match-beginning 0) (match-end 0))
+ (delete-region (match-beginning 0) (match-end 0))
+ )
+ ))
+ ))
+ )))
+
+
+;;; @ for message header
+;;;
+
+(defun mime/decode-message-header ()
+ (interactive "*")
+ (save-excursion
+ (save-restriction
+ (narrow-to-region (goto-char (point-min))
+ (progn (re-search-forward "^$" nil t) (point)))
+ (mime/decode-encoded-words-region (point-min) (point-max) t)
+ )))
+
+(defun mime/unfolding ()
+ (goto-char (point-min))
+ (let (field beg end)
+ (while (re-search-forward message/field-name-regexp nil t)
+ (setq beg (match-beginning 0))
+ (setq end (message/field-end))
+ (setq field (buffer-substring beg end))
+ (if (string-match mime/encoded-word-regexp field)
+ (save-restriction
+ (narrow-to-region (goto-char beg) end)
+ (while (re-search-forward "\n[ \t]+" nil t)
+ (replace-match " ")
+ )
+ (goto-char (point-max))
+ ))
+ )))
+
+
+;;; @ encoded-word decoder
+;;;
+
+(defun mime/decode-encoded-word (word)
+ (or (if (string-match mime/encoded-word-regexp word)
+ (let ((charset
+ (upcase
+ (substring word (match-beginning 1) (match-end 1))
+ ))
+ (encoding
+ (upcase
+ (substring word (match-beginning 2) (match-end 2))
+ ))
+ (text
+ (substring word (match-beginning 3) (match-end 3))
+ ))
+ (mime/decode-encoded-text charset encoding text)
+ ))
+ word))
+
+
+;;; @ encoded-text decoder
+;;;
+
+(defun mime/decode-encoded-text (charset encoding str)
+ (let ((dest
+ (cond ((string= "B" encoding)
+ (base64-decode-string str))
+ ((string= "Q" encoding)
+ (q-encoding-decode-string str))
+ (t (message "unknown encoding %s" encoding)
+ nil))))
+ (if dest
+ (mime/convert-string-to-emacs charset dest)
+ )))
+
+
+;;; @ end
+;;;
+
+(provide 'tm-ew-d)
--- /dev/null
+;;;
+;;; tm-ew-d.el --- RFC 1522 based multilingual MIME message header
+;;; encoder for GNU Emacs
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1993,1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-ew-e.el,v 7.0 1995/10/03 04:35:11 morioka Exp $
+;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
+;;;
+
+(require 'mel)
+(require 'tl-822)
+(require 'tm-def)
+
+
+;;; @ encoded-text encoder
+;;;
+
+(defun tm-eword::encode-encoded-text (charset encoding string &optional mode)
+ (let ((text
+ (cond ((string= encoding "B")
+ (base64-encode-string string))
+ ((string= encoding "Q")
+ (q-encoding-encode-string string mode))
+ )
+ ))
+ (if text
+ (concat "=?" charset "?" encoding "?" text "?=")
+ )))
+
+
+;;; @ leading char
+;;;
+
+(defun tm-eword::char-type (chr)
+ (if (or (= chr 32)(= chr ?\t))
+ nil
+ (char-leading-char chr)
+ ))
+
+(defun tm-eword::parse-lc-word (str)
+ (let* ((rest (string-to-char-list str))
+ (chr (car rest))
+ (lc (tm-eword::char-type chr))
+ (p (char-bytes chr))
+ )
+ (catch 'tag
+ (while (setq rest (cdr rest))
+ (setq chr (car rest))
+ (if (not (eq lc (tm-eword::char-type chr)))
+ (throw 'tag nil)
+ )
+ (setq p (+ p (char-bytes chr)))
+ ))
+ (cons (cons lc (substring str 0 p)) (substring str p))
+ ))
+
+(defun tm-eword::split-to-lc-words (str)
+ (let (ret dest)
+ (while (and (not (string= str ""))
+ (setq ret (tm-eword::parse-lc-word str))
+ )
+ (setq dest (cons (car ret) dest))
+ (setq str (cdr ret))
+ )
+ (reverse dest)
+ ))
+
+
+;;; @ word
+;;;
+
+(defun tm-eword::parse-word (lcwl)
+ (let* ((lcw (car lcwl))
+ (lc (car lcw))
+ )
+ (if (null lc)
+ lcwl
+ (let ((lcl (list lc))
+ (str (cdr lcw))
+ )
+ (catch 'tag
+ (while (setq lcwl (cdr lcwl))
+ (setq lcw (car lcwl))
+ (setq lc (car lcw))
+ (if (null lc)
+ (throw 'tag nil)
+ )
+ (if (not (memq lc lcl))
+ (setq lcl (cons lc lcl))
+ )
+ (setq str (concat str (cdr lcw)))
+ ))
+ (cons (cons lcl str) lcwl)
+ ))))
+
+(defun tm-eword::lc-words-to-words (lcwl)
+ (let (ret dest)
+ (while (setq ret (tm-eword::parse-word lcwl))
+ (setq dest (cons (car ret) dest))
+ (setq lcwl (cdr ret))
+ )
+ (reverse dest)
+ ))
+
+
+;;; @ rule
+;;;
+
+(defun mime/find-charset-rule (lcl)
+ (if lcl
+ (let ((ret (some-element
+ (function
+ (lambda (elt)
+ (subsetp lcl (car elt))
+ ))
+ mime/lc-charset-rule-list)
+ ))
+ (if ret
+ (cdr ret)
+ mime/unknown-charset-rule)
+ )
+ '(nil nil)
+ ))
+
+(defun tm-eword::words-to-ruled-words (wl)
+ (mapcar (function
+ (lambda (word)
+ (cons (cdr word) (mime/find-charset-rule (car word)))
+ ))
+ wl))
+
+(defun tm-eword::space-process (seq)
+ (let (prev a ac b c cc)
+ (while seq
+ (setq b (car seq))
+ (setq seq (cdr seq))
+ (setq c (car seq))
+ (setq cc (nth 1 c))
+ (if (null (nth 1 b))
+ (progn
+ (setq a (car prev))
+ (setq ac (nth 1 a))
+ (if (and (nth 2 a)(nth 2 c))
+ (cond ((equal ac cc)
+ (setq prev (cons
+ (cons (concat (car a)(car b)(car c))
+ (cdr a))
+ (cdr prev)
+ ))
+ (setq seq (cdr seq))
+ )
+ (t
+ (setq prev (cons
+ (cons (concat (car a)(car b))
+ (cdr a))
+ (cdr prev)
+ ))
+ ))
+ (setq prev (cons b prev))
+ ))
+ (setq prev (cons b prev))
+ ))
+ (reverse prev)
+ ))
+
+(defun tm-eword::split-string (str)
+ (tm-eword::space-process
+ (tm-eword::words-to-ruled-words
+ (tm-eword::lc-words-to-words
+ (tm-eword::split-to-lc-words str)
+ ))))
+
+
+;;; @ 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))
+ ret)
+ (setq ret
+ (cond ((equal encoding "B")
+ (setq string
+ (mime/convert-string-from-emacs string charset))
+ (base64-length string)
+ )
+ ((equal encoding "Q")
+ (setq string
+ (mime/convert-string-from-emacs string charset))
+ (q-encoding-length string)
+ )))
+ (if ret
+ (cons (+ 7 (length charset) ret) string)
+ )))
+
+
+;;; @ encode-string
+;;;
+
+(defun tm-eword::encode-string-1 (column rwl &optional mode)
+ (let* ((rword (car rwl))
+ (ret (tm-eword::encoded-word-length rword))
+ string len)
+ (if (null ret)
+ (cond ((and (setq string (car rword))
+ (<= (setq len (+ (length string) column)) 76)
+ )
+ (setq rwl (cdr rwl))
+ )
+ (t
+ (setq string "\n ")
+ (setq len 1)
+ ))
+ (cond ((and (setq len (car ret))
+ (<= (+ column len) 76)
+ )
+ (setq string
+ (tm-eword::encode-encoded-text
+ (nth 1 rword) (nth 2 rword) (cdr ret)
+ ))
+ (setq len (+ (length string) column))
+ (setq rwl (cdr rwl))
+ )
+ (t
+ (setq string (car rword))
+ (let* ((ls (reverse (string-to-char-list string)))
+ (sl (length string))
+ (p sl) str)
+ (while (and ls
+ (progn
+ (setq p (- p (char-bytes (car ls))))
+ (setq str (substring string 0 p))
+ (setq ret (tm-eword::encoded-word-length
+ (cons str (cdr rword))
+ ))
+ (setq str (cdr ret))
+ (setq len (+ (car ret) column))
+ (> len 76)
+ ))
+ (setq ls (cdr ls))
+ )
+ (if ls
+ (progn
+ (setq rwl (cons (cons (substring string p) (cdr rword))
+ (cdr rwl)))
+ (setq string
+ (tm-eword::encode-encoded-text
+ (nth 1 rword) (nth 2 rword) str))
+ (setq len (+ (length string) column))
+ )
+ (setq string "\n ")
+ (setq len 1)
+ )
+ )))
+ )
+ (list string len rwl)
+ ))
+
+(defun tm-eword::encode-rwl (column rwl &optional mode)
+ (let (ret dest)
+ (while rwl
+ (setq ret (tm-eword::encode-string-1 column rwl mode))
+ (setq dest (concat dest (car ret))
+ column (nth 1 ret)
+ rwl (nth 2 ret))
+ )
+ (list dest column)
+ ))
+
+(defun tm-eword::encode-string (column str &optional mode)
+ (tm-eword::encode-rwl column (tm-eword::split-string str) mode)
+ )
+
+
+;;; @ converter
+;;;
+
+(defun tm-eword::phrase-to-rwl (phrase)
+ (let (token type dest)
+ (while phrase
+ (setq token (car phrase))
+ (setq type (car token))
+ (cond ((eq type 'quoted-string)
+ (setq dest
+ (append dest
+ '(("\"" nil nil))
+ (tm-eword::words-to-ruled-words
+ (tm-eword::lc-words-to-words
+ (tm-eword::split-to-lc-words (cdr token))))
+ '(("\"" nil nil))
+ ))
+ )
+ ((eq type 'comment)
+ (setq dest
+ (append dest
+ '(("(" nil nil))
+ (tm-eword::words-to-ruled-words
+ (tm-eword::lc-words-to-words
+ (tm-eword::split-to-lc-words (cdr token))))
+ '((")" nil nil))
+ ))
+ )
+ (t
+ (setq dest (append dest
+ (tm-eword::words-to-ruled-words
+ (tm-eword::lc-words-to-words
+ (tm-eword::split-to-lc-words (cdr token))
+ ))))
+ ))
+ (setq phrase (cdr phrase))
+ )
+ (tm-eword::space-process dest)
+ ))
+
+(defun tm-eword::phrase-route-addr-to-rwl (phrase-route-addr)
+ (if (eq (car phrase-route-addr) 'phrase-route-addr)
+ (let ((phrase (nth 1 phrase-route-addr))
+ (route (nth 2 phrase-route-addr))
+ dest)
+ (setq dest (tm-eword::phrase-to-rwl phrase))
+ (if dest
+ (setq dest (append dest '((" " nil nil))))
+ )
+ (append
+ dest
+ (list (list (concat "<" (rfc822/addr-to-string route) ">") nil nil))
+ ))))
+
+(defun tm-eword::addr-spec-to-rwl (addr-spec)
+ (if (eq (car addr-spec) 'addr-spec)
+ (list (list (rfc822/addr-to-string (cdr addr-spec)) nil nil))
+ ))
+
+(defun tm-eword::mailbox-to-rwl (mbox)
+ (let ((addr (nth 1 mbox))
+ (comment (nth 2 mbox))
+ dest)
+ (setq dest (or (tm-eword::phrase-route-addr-to-rwl addr)
+ (tm-eword::addr-spec-to-rwl addr)
+ ))
+ (if comment
+ (setq dest
+ (append dest
+ '((" " nil nil)
+ ("(" nil nil))
+ (tm-eword::split-string comment)
+ '((")" nil nil))
+ )))
+ dest))
+
+(defun tm-eword::addresses-to-rwl (addresses)
+ (let ((dest (tm-eword::mailbox-to-rwl (car addresses))))
+ (if dest
+ (while (setq addresses (cdr addresses))
+ (setq dest (append dest
+ '(("," nil nil))
+ '((" " nil nil))
+ (tm-eword::mailbox-to-rwl (car addresses))
+ ))
+ ))
+ dest))
+
+(defun tm-eword::encode-address-list (column str)
+ (tm-eword::encode-rwl
+ column
+ (tm-eword::addresses-to-rwl
+ (rfc822/parse-addresses
+ (rfc822/lexical-analyze str)))))
+
+
+;;; @ end
+;;;
+
+(provide 'tm-ew-e)
;;;
-;;; A multilingual MIME message header encoder/decoder.
-;;; by Morioka Tomohiko (morioka@jaist.ac.jp)
+;;; tm-eword.el --- RFC 1522 based multilingual MIME message header
+;;; encoder/decoder for GNU Emacs
;;;
-;;; original MIME decoder is
-;;; mime.el,v 1.5 1992/07/18 07:52:08 by Enami Tsugutomo
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1993,1994,1995 MORIOKA Tomohiko
;;;
-
-;;; @ require modules
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
;;;
-(require 'tl-misc)
-(require 'tl-822)
-(require 'tl-num)
-(require 'base64)
-(require 'qprint)
+(require 'tl-header)
+(require 'tl-str)
+(require 'tm-def)
-;;; @ version
-;;;
-(defconst mime/RCS-ID
- "$Id: tm-eword.el,v 5.12 1995/05/21 16:06:27 morioka Exp morioka $")
+(autoload 'mime/decode-encoded-words-string "tm-ew-d")
+(autoload 'mime/decode-encoded-words-region "tm-ew-d" nil t)
+(autoload 'mime/decode-message-header "tm-ew-d" nil t)
-(defconst mime/tiny-mime-version (get-version-string mime/RCS-ID))
+(require 'tm-ew-e)
-;;; @ MIME encoded-word definition
+;;; @ version
;;;
-(defconst mime/charset-regexp "[A-Za-z0-9!#$%&'*+---^_`{}|~]")
-(defconst mime/encoded-text-regexp "[!->@-~]+")
-
-(defconst mime/Base64-token-regexp "[A-Za-z0-9+/=]")
-(defconst mime/Base64-encoded-text-regexp
- (concat "\\("
- mime/Base64-token-regexp
- mime/Base64-token-regexp
- mime/Base64-token-regexp
- mime/Base64-token-regexp
- "\\)+"))
-(defconst mime/Base64-encoding-and-encoded-text-regexp
- (concat "\\(B\\)\\?" mime/Base64-encoded-text-regexp))
-
-(defconst mime/Quoted-Printable-hex-char-regexp "[0123456789ABCDEF]")
-(defconst mime/Quoted-Printable-octet-regexp
- (concat "="
- mime/Quoted-Printable-hex-char-regexp
- mime/Quoted-Printable-hex-char-regexp))
-(defconst mime/Quoted-Printable-encoded-text-regexp
- (concat "\\([^=?]\\|" mime/Quoted-Printable-octet-regexp "\\)+"))
-(defconst mime/Quoted-Printable-encoding-and-encoded-text-regexp
- (concat "\\(Q\\)\\?" mime/Quoted-Printable-encoded-text-regexp))
+(defconst tm-eword/RCS-ID
+ "$Id: tm-eword.el,v 7.0 1995/10/03 04:40:06 morioka Exp $")
-(defconst mime/encoded-word-regexp (concat (regexp-quote "=?")
- "\\("
- mime/charset-regexp
- "+\\)"
- (regexp-quote "?")
- "\\(B\\|Q\\)"
- (regexp-quote "?")
- "\\("
- mime/encoded-text-regexp
- "\\)"
- (regexp-quote "?=")))
-
-(defun mime/nth-string (s n)
- (if (stringp s)
- (substring s (match-beginning n) (match-end n))
- (buffer-substring (match-beginning n) (match-end n))))
-
-(defun mime/encoded-word-charset (str)
- (mime/nth-string str 1))
-
-(defun mime/encoded-word-encoding (str)
- (mime/nth-string str 2))
-
-(defun mime/encoded-word-encoded-text (str)
- (mime/nth-string str 3))
-
-(defun mime/rest-of-string (str)
- (if (stringp str)
- (substring str (match-end 0))
- (buffer-substring (match-end 0)(point-max))
- ))
+(defconst tm-eword/version (get-version-string tm-eword/RCS-ID))
;;; @ variables
;;;
-(defvar mime/no-encoding-header-fields '("X-Nsubject"))
+(defvar mime/no-encoding-header-fields '("X-Nsubject" "Newsgroups"))
(defvar mime/use-X-Nsubject nil)
-;;; @ compatible module among Mule, NEmacs and NEpoch
-;;;
-(cond ((boundp 'MULE) (require 'tm-mule))
- ((boundp 'NEMACS)(require 'tm-nemacs))
- (t (require 'tm-orig))
- )
-
-
;;; @ Application Interface
;;;
-;;; @@ MIME header decoders
-;;;
-
-;; by mol. 1993/10/4
-(defun mime/decode-encoded-word (word)
- (if (string-match mime/encoded-word-regexp word)
- (let ((charset (upcase (mime/encoded-word-charset word)))
- (encoding (mime/encoded-word-encoding word))
- (text (mime/encoded-word-encoded-text word)))
- (mime/decode-encoded-text charset encoding text))
- word))
-
-(defun mime/decode-region (beg end)
- (interactive "*r")
- (save-excursion
- (save-restriction
- (narrow-to-region beg end)
- (goto-char (point-min))
- (let (charset encoding text)
- (while (re-search-forward mime/encoded-word-regexp nil t)
- (insert (mime/decode-encoded-word
- (prog1
- (buffer-substring (match-beginning 0) (match-end 0))
- (delete-region (match-beginning 0) (match-end 0))
- )
- ))
- ))
- )))
-
-(defun mime/decode-message-header ()
- (interactive "*")
- (save-excursion
- (save-restriction
- (narrow-to-region (goto-char (point-min))
- (progn (re-search-forward "^$" nil t) (point)))
- (mime/prepare-decode-message-header)
- (mime/decode-region (point-min) (point-max))
- )))
-
-(defun mime/decode-string (str)
- (let ((dest "")(ew nil)
- beg end)
- (while (setq beg (string-match mime/encoded-word-regexp str))
- (if (> beg 0)
- (if (not (and (eq ew t) (string= (substring str 0 beg) " ")))
- (setq dest (concat dest (substring str 0 beg)
- ))
- )
- )
- (setq end (match-end 0))
- (setq dest (concat dest (mime/decode-encoded-word (substring str beg end))
- ))
- (setq str (substring str end))
- (setq ew t)
- )
- (concat dest str)
- ))
-
;;; @@ MIME header encoders
;;;
-(defun mime/encode-string (string encoding &optional mode)
- (cond ((equal encoding "B")
- (base64-encode-string string)
- )
- ((equal encoding "Q")
- (quoted-printable-encode-string string (or mode 'phrase))
- )
- ))
-
(defun mime/encode-field (str)
- (setq str (rfc822/unfolding-string str))
+ (setq str (message/unfolding-string str))
(let ((ret (message/divide-field str))
field-name field-body)
(setq field-name (car ret))
(string-match "^bcc:$" field-name)
(string-match "^Resent-bcc:$" field-name)
)
- (mime/encode-address-list
- (+ (length field-name) 1) field-body)
+ (car (tm-eword::encode-address-list
+ (+ (length field-name) 1) field-body))
)
(t
(catch 'tag
)
(setq r (cdr r))
))
- (nth 1 (mime/encode-header-string
- (+ (length field-name) 1) field-body))
+ (car (tm-eword::encode-string
+ (+ (length field-name) 1) field-body))
))
))
))
+(defun mime/exist-encoded-word-in-subject ()
+ (let ((str (message/get-field-body "Subject")))
+ (if (and str (string-match mime/encoded-word-regexp str))
+ str)))
+
(defun mime/encode-message-header ()
(interactive "*")
(save-excursion
(narrow-to-region (goto-char (point-min))
(progn
(re-search-forward
- (concat "^" (regexp-quote mail-header-separator) "$")
+ (concat
+ "^" (regexp-quote mail-header-separator) "$")
nil t)
(match-beginning 0)
))
)))
))
(if mime/use-X-Nsubject
- (progn
- (goto-char (point-min))
- (if (re-search-forward "^Subject:.*\\(\n\\s +.*\\)*" nil t)
- (let ((str (buffer-substring (match-beginning 0)(match-end 0))))
- (if (string-match mime/encoded-word-regexp str)
- (insert (concat
- "\nX-Nsubject: "
- (nth 1 (message/divide-field
- (mime/decode-string
- (rfc822/unfolding-string str))
- ))))
- ))
- )))
- )))
-
-
-;;; @ functions for message header encoding
-;;;
-
-(defun mime/encode-and-split-string (n string charset encoding)
- (let ((i 0) (j 0)
- (len (length string))
- (js (mime/convert-string-from-emacs string charset))
- (cesl (+ (length charset) (length encoding) 6 ))
- ewl m rest)
- (setq ewl (mime/encoded-word-length js encoding))
- (if (null ewl) nil
- (progn
- (setq m (+ n ewl cesl))
- (if (> m 76)
- (progn
- (while (and (< i len)
- (setq js (mime/convert-string-from-emacs
- (substring string 0 i) charset))
- (setq m (+ n (mime/encoded-word-length js encoding) cesl))
- (< m 76))
- (setq j i)
- (setq i (+ i (char-bytes (elt string i))))
- )
- (setq js (mime/convert-string-from-emacs
- (substring string 0 j) charset))
- (setq m (+ n (mime/encoded-word-length js encoding) cesl))
- (setq rest (substring string j))
- )
- (setq rest nil))
- (if (string= js "")
- (list 1 "" string)
- (list m (concat "=?" charset "?" encoding "?"
- (mime/encode-string js encoding)
- "?=") rest))
- ))
- ))
-
-(defun mime/encode-header-word (n string charset encoding)
- (let (dest str ret m)
- (if (null (setq ret (mime/encode-and-split-string n string charset encoding)))
- nil
- (progn
- (setq dest (nth 1 ret))
- (setq m (car ret))
- (setq str (nth 2 ret))
- (while (and (stringp str)
- (setq ret (mime/encode-and-split-string 1 str charset encoding))
- )
- (setq dest (concat dest "\n " (nth 1 ret)))
- (setq m (car ret))
- (setq str (nth 2 ret))
- )
- (list m dest)
- ))
- ))
-
-(defun mime/encode-header-string (n string &optional mode)
- (if (string= string "")
- (list n "")
- (let ((ssl (mime/separate-string-for-encoder string))
- i len cell et w ew (dest "") b l)
- (setq len (length ssl))
- (setq cell (nth 0 ssl))
- (setq et (car cell))
- ;; string-width crashes when the argument is nil,
- ;; so replace the argument
- ;; (original modification by Kenji Rikitake 9-JAN-1995)
- (setq w (or (cdr cell) ""))
- (if (eq et nil)
- (progn
- (if (> (+ n (string-width w)) 76)
- (progn
- (setq dest (concat dest "\n "))
- (setq b 1)
- )
- (setq b n))
- (setq dest (concat dest w))
- (setq b (+ b (string-width w)))
- )
- (progn
- (setq ew (mime/encode-header-word n (cdr cell) (car et) (cdr et)))
- (setq dest (nth 1 ew))
- (setq b (car ew))
- ))
- (setq i 1)
- (while (< i len)
- (setq cell (nth i ssl))
- (setq et (car cell))
- (setq w (cdr cell))
- (cond ((string-match "^[ \t]*$" w)
- (setq b (+ b (string-width (cdr cell))))
- (setq dest (concat dest (cdr cell)))
- )
- ((eq et nil)
- (if (> (+ b (string-width w)) 76)
- (progn
- (if (eq (elt dest (- (length dest) 1)) 32)
- (setq dest (substring dest 0 (- (length dest) 1)))
- )
- (setq dest (concat dest "\n " w))
- (setq b (+ (length w) 1))
- )
- (setq l (length dest))
- (if (and (>= l 2)
- (eq (elt dest (- l 2)) ?\?)
- (eq (elt dest (- l 1)) ?=)
- )
- (progn
- (setq dest (concat dest " "))
- (setq b (+ b 1))
- ))
- (setq dest (concat dest w))
- (setq b (+ b (string-width w)))
- ))
- (t
- (if (not (eq (elt dest (- (length dest) 1)) 32))
- (progn
- (setq dest (concat dest " "))
- (setq b (+ b 1))
- ))
- (setq ew
- (mime/encode-header-word b (cdr cell) (car et) (cdr et)))
- (setq b (car ew))
- (if (string-match "^\n" (nth 1 ew))
- (setq dest (concat (substring dest 0 (- (length dest) 1))
- (nth 1 ew)))
- (setq dest (concat dest (nth 1 ew)))
- )
- ))
- (setq i (+ i 1))
- )
- (list b dest)
- )))
-
-(defun mime/encode-address-list (n str)
- (let* ((ret (message/parse-addresses str))
- (r ret) cell en-ret j cl (dest "") s)
- (while r
- (setq cell (car r))
- (cond ((string= (nth 1 cell) "<")
- (setq en-ret (mime/encode-header-string n (nth 0 cell) 'phrase))
- (setq dest (concat dest (nth 1 en-ret)))
- (setq n (car en-ret))
- (if (> (length r) 1)
- (setq en-ret
- (mime/encode-header-string
- n (concat (nth 1 cell)(nth 2 cell)(nth 3 cell) ", ")))
- (setq en-ret (mime/encode-header-string
- n (concat (nth 1 cell)(nth 2 cell)(nth 3 cell))))
- )
- (if (and (eq (elt (nth 1 en-ret) 0) ?\n)
- (eq (elt dest (- (length dest) 1)) 32))
- (setq dest (substring dest 0 (- (length dest) 1)))
- )
- (setq dest (concat dest (nth 1 en-ret)))
- (setq n (car en-ret))
- )
- ((= (length cell) 4)
- (setq en-ret (mime/encode-header-string n (nth 0 cell)))
- (setq dest (concat dest (nth 1 en-ret)))
- (setq n (car en-ret))
-
- (setq en-ret (mime/encode-header-string (+ n 2) (nth 2 cell)
- 'comment))
- (if (eq (elt (nth 1 en-ret) 0) ?\n)
- (progn
- (setq dest (concat dest "\n ("))
- (setq en-ret (mime/encode-header-string 2 (nth 2 cell)
- 'comment))
- )
- (progn
- (setq dest (concat dest " ("))
- ))
- (setq dest (concat dest (nth 1 en-ret)))
- (setq n (car en-ret))
- (if (> (length r) 1)
- (setq en-ret
- (mime/encode-header-string n (concat (nth 3 cell) ", "))
- )
- (setq en-ret (mime/encode-header-string n (nth 3 cell)))
- )
- (setq dest (concat dest (nth 1 en-ret)))
- (setq n (car en-ret))
- )
- (t
- (if (> (length r) 1)
- (setq en-ret
- (mime/encode-header-string n (concat (nth 0 cell) ", "))
- )
- (setq en-ret (mime/encode-header-string n (nth 0 cell)))
- )
- (setq dest (concat dest (nth 1 en-ret)))
- (setq n (car en-ret))
- ))
- (setq r (cdr r))
- )
- dest))
-
-
-;;; @ utility for encoder
-;;;
-
-;;; @@ encoded-word length
-;;;
-
-(defun mime/encoded-word-length (string encoding)
- (cond ((equal encoding "B") (base64-encoded-length string))
- ((equal encoding "Q") (quoted-printable-encoded-length string))
- ))
-
-;;; @@ separate by character set
-;;;
-
-;; by mol. 1993/11/2
-(defconst LC-space 2)
-
-;; by mol. 1993/10/16
-(defun mime/char-type (chr)
- (if (or (= chr 32)(= chr ?\t))
- LC-space
- (get-lc chr)
- ))
-
-(defun mime/separate-string-by-chartype (string)
- (let ((len (length string))
- (dest nil) (ds "") s
- pcs i j cs chr)
- (if (= len 0) nil
- (progn
- (setq chr (elt string 0))
- (setq pcs (mime/char-type chr))
- (setq i (char-bytes chr))
- (setq ds (substring string 0 i))
- (while (< i len)
- (setq chr (elt string i))
- (setq cs (mime/char-type chr))
- (setq j (+ i (char-bytes chr)))
- (setq s (substring string i j))
- (setq i j)
- (if (= cs pcs)
- (setq ds (concat ds s))
- (progn (setq dest (append dest (list (cons pcs ds))))
- (setq pcs cs)
- (setq ds s)
- ))
- )
- (if (not (string= ds ""))
- (setq dest (append dest (list (cons pcs ds)))))
- dest)
+ (let ((str (mime/exist-encoded-word-in-subject)))
+ (if str
+ (insert
+ (concat
+ "\nX-Nsubject: "
+ (mime/decode-encoded-words-string
+ (message/unfolding-string str))
+ )))))
)))
-(defun mime/separate-string-by-charset (str)
- (let ((rl (mime/separate-string-by-chartype str))
- (i 1) len (pcell nil) cell ncell dpcell (dest nil) LC)
- (setq len (length rl))
- (setq dpcell (list (nth 0 rl)))
- (setq cell (nth 1 rl))
- (setq ncell (nth 2 rl))
- (while (< i len)
- (setq LC (car (car dpcell)))
- (cond ((and (not (eq LC lc-ascii))
- (eq (car cell) LC-space)
- (not (eq (car ncell) lc-ascii)))
- (setq dpcell (list (cons LC
- (concat (cdr (car dpcell)) (cdr cell))
- )))
- )
- ((and (not (eq LC lc-ascii))
- (eq LC (car cell)))
- (setq dpcell (list (cons LC
- (concat (cdr (car dpcell)) (cdr cell))
- )))
- )
- ((and (eq LC lc-ascii)
- (member (car cell) mime/latin-lc-list))
- (setq dpcell (list (cons (car cell)
- (concat (cdr (car dpcell)) (cdr cell))
- )))
- )
- ((and (member LC mime/latin-lc-list)
- (eq (car cell) lc-ascii))
- (setq dpcell (list (cons LC
- (concat (cdr (car dpcell)) (cdr cell))
- )))
- )
- (t
- (setq dest (append dest dpcell))
- (setq dpcell (list cell))
- ))
- (setq i (+ i 1))
- (setq cell ncell)
- (setq ncell (nth (+ i 1) rl))
- )
- (setq dest (append dest dpcell))
- ))
-
-(defun mime/separate-string-for-encoder (string)
- (let (lastspace)
- (if (string-match "[ \t]+$" string)
- (progn
- (setq lastspace (substring string
- (match-beginning 0)
- (match-end 0)))
- (setq string (substring string 0 (match-beginning 0)))
- ))
- (let ((rl (mime/separate-string-by-charset string))
- (i 0) len cell0 cell1 cell2 (dest nil))
- (setq len (length rl))
- (setq cell0 (nth 0 rl))
- (setq cell1 (nth 1 rl))
- (setq cell2 (nth 2 rl))
- (while (< i len)
- (cond ((and (not (eq (car cell0) lc-ascii))
- (eq (car cell1) LC-space)
- (not (eq (car cell2) lc-ascii))
- )
- (setq dest
- (append dest (list
- (cons
- (cdr (assoc (car cell0)
- mime/lc-charset-and-encoding-alist))
- (concat (cdr cell0) (cdr cell1))
- ))))
- (setq i (+ i 2))
- (setq cell0 (nth i rl))
- (setq cell1 (nth (+ i 1) rl))
- (setq cell2 (nth (+ i 2) rl))
- )
- (t
- (setq dest
- (append dest (list
- (cons
- (cdr (assoc (car cell0)
- mime/lc-charset-and-encoding-alist))
- (cdr cell0)))))
- (setq i (+ i 1))
- (setq cell0 cell1)
- (setq cell1 cell2)
- (setq cell2 (nth (+ i 2) rl))
- ))
- )
- (append dest
- (if lastspace
- (list (cons nil lastspace))))
- )))
-
-
+;;; @ end
;;;
-;;; basic functions for MIME header decoder
-;;;
-
-;;; @ utility for decoder
-;;;
-
-(defun mime/unfolding ()
- (goto-char (point-min))
- (let (field beg end)
- (while (re-search-forward message/field-regexp nil t)
- (setq beg (match-beginning 0))
- (setq end (match-end 0))
- (setq field (buffer-substring beg end))
- (if (string-match mime/encoded-word-regexp field)
- (progn
- (save-excursion
- (save-restriction
- (narrow-to-region (goto-char beg) end)
- (while (re-search-forward "\n[ \t]+" nil t)
- (replace-match " ")
- )
- ))
- ))
- ))
- )
-
-(defun mime/prepare-decode-message-header ()
- (mime/unfolding)
- (goto-char (point-min))
- (while (re-search-forward
- (concat (regexp-quote "?=")
- "\\s +"
- (regexp-quote "=?"))
- nil t)
- (replace-match "?==?")
- )
- )
-
-(setq mime-charset-list
- (list (list "US-ASCII" lc-ascii)
- (list "ISO-8859-1" lc-ascii lc-ltn1)
- (list "ISO-8859-2" lc-ascii lc-ltn2)
- (list "ISO-8859-3" lc-ascii lc-ltn3)
- (list "ISO-8859-4" lc-ascii lc-ltn4)
- (list "ISO-8859-5" lc-ascii lc-crl)
- (list "ISO-8859-7" lc-ascii lc-grk)
- (list "ISO-8859-9" lc-ascii lc-ltn5)
- (list "ISO-2022-JP" lc-ascii lc-jp)
- (list "ISO-2022-KR" lc-ascii lc-kr)
- (list "ISO-2022-JP-2" lc-ascii lc-ltn1 lc-grk
- lc-jp lc-cn lc-kr lc-jp2)
- (list "ISO-2022-INT-1" lc-ascii lc-ltn1 lc-grk
- lc-jp lc-cn lc-kr lc-jp2 lc-cns1 lc-cns2)
- ))
-
-(setq eword-field-body-separator-regexp " / ")
-
-(if (string-match eword-field-body-separator-regexp str)
- (list (substring str 0 (match-beginning 0))
- (substring str (match-beginning 0)(match-end 0))
- (substring str (match-end 0))
- ))
-
-(defun find-lc-set-string (str)
- (let (dest (len (length str))(i 0) chr lc)
- (while (< i len)
- (setq chr (elt str i))
- (setq lc (get-lc chr))
- (if (not (memq lc dest))
- (setq dest (cons lc dest))
- )
- (setq i (+ i (char-bytes chr)))
- )
- dest))
-
-(defun mime/lc-set-to-charset (lc-set)
- (let ((rest mime-charset-list) cell)
- (catch 'tag
- (while rest
- (setq cell (car rest))
- (if (subsetp lc-set (cdr cell))
- (throw 'tag (car cell))
- )
- (setq rest (cdr rest))
- ))))
-
-(run-hooks 'mime/tiny-mime-load-hook)
-(provide 'tiny-mime)
+(provide 'tm-eword)
-;;; @
-;;; Local Variables:
-;;; mode: emacs-lisp
-;;; mode: outline-minor
-;;; outline-regexp: ";;; @+\\|(......"
-;;; End:
+(run-hooks 'tm-eword-load-hook)
;;;
-;;; $Id: tm-mule.el,v 6.5 1995/09/12 13:24:04 morioka Exp $
+;;; tm-mule.el --- tm definitions depended on Mule
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-mule.el,v 7.1 1995/10/03 04:49:53 morioka Exp $
+;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'emu)
(require 'tl-list)
-;;; @ variables
+;;; @ coding-system
;;;
(defvar mime/default-coding-system *ctext*)
+(defvar mime/charset-coding-system-alist
+ '(("ISO-2022-JP" . *iso-2022-ss2-7*)
+ ("ISO-2022-JP-2" . *iso-2022-ss2-7*)
+ ("X-ISO-2022-JP-2" . *iso-2022-ss2-7*)
+ ("ISO-2022-CN" . *iso-2022-ss2-7*)
+ ("ISO-2022-KR" . *iso-2022-kr*)
+ ("EUC-KR" . *euc-kr*)
+ ("ISO-8859-1" . *ctext*)
+ ("ISO-8859-2" . *iso-8859-2*)
+ ("ISO-8859-3" . *iso-8859-3*)
+ ("ISO-8859-4" . *iso-8859-4*)
+ ("ISO-8859-5" . *iso-8859-5*)
+ ("ISO-8859-7" . *iso-8859-7*)
+ ("ISO-8859-8" . *iso-8859-8*)
+ ("ISO-8859-9" . *iso-8859-9*)
+ ("ISO-2022-INT-1" . *iso-2022-int-1*)
+ ))
+
+
+;;; @ charset and encoding
+;;;
+
+(defvar mime/lc-charset-rule-list
+ (list
+ (list (list lc-ascii) "US-ASCII" nil)
+ (list (list lc-ascii lc-ltn1) "ISO-8859-1" "Q")
+ (list (list lc-ascii lc-ltn2) "ISO-8859-2" "Q")
+ (list (list lc-ascii lc-ltn3) "ISO-8859-3" "Q")
+ (list (list lc-ascii lc-ltn4) "ISO-8859-4" "Q")
+;;;(list (list lc-ascii lc-crl) "ISO-8859-5" "Q")
+ (list (list lc-ascii lc-crl) "KOI8-R" "Q")
+ (list (list lc-ascii lc-grk) "ISO-8859-7" "Q")
+ (list (list lc-ascii lc-hbw) "ISO-8859-8" "Q")
+ (list (list lc-ascii lc-ltn5) "ISO-8859-9" "Q")
+ (list (list lc-ascii lc-jp) "ISO-2022-JP" "B")
+ (list (list lc-ascii lc-kr) "EUC-KR" "B")
+ (list (list lc-ascii
+ lc-jp lc-cn
+ lc-kr lc-jp2
+ lc-ltn1 lc-grk) "ISO-2022-JP-2" "B")
+ (list (list lc-ascii
+ lc-jp lc-cn
+ lc-kr lc-jp2
+ lc-cns1 lc-cns2
+ lc-ltn1 lc-grk) "ISO-2022-INT-1" "B")
+ ))
+
+(defvar mime/unknown-charset-rule '("ISO-2022-INT-1" "B"))
+
+
+;;; @ (obsoleted)
+;;;
+
(defvar mime/lc-charset-and-encoding-alist
(list
(cons lc-ascii nil)
(defvar mime/latin-lc-list
(list lc-ascii lc-ltn1 lc-ltn2 lc-ltn3 lc-ltn4 lc-ltn5))
-(defvar mime/charset-coding-system-alist
- '(("ISO-2022-JP" . *iso-2022-ss2-7*)
- ("ISO-2022-JP-2" . *iso-2022-ss2-7*)
- ("X-ISO-2022-JP-2" . *iso-2022-ss2-7*)
- ("ISO-2022-CN" . *iso-2022-ss2-7*)
- ("ISO-2022-KR" . *iso-2022-kr*)
- ("EUC-KR" . *euc-kr*)
- ("ISO-8859-1" . *ctext*)
- ("ISO-8859-2" . *iso-8859-2*)
- ("ISO-8859-3" . *iso-8859-3*)
- ("ISO-8859-4" . *iso-8859-4*)
- ("ISO-8859-5" . *iso-8859-5*)
- ("ISO-8859-7" . *iso-8859-7*)
- ("ISO-8859-8" . *iso-8859-8*)
- ("ISO-8859-9" . *iso-8859-9*)
- ("ISO-2022-INT-1" . *iso-2022-int-1*)
- ))
-
(defvar mime/charset-lc-alist
(list
(cons "ISO-8859-1" lc-ltn1) ; Latin-1
(cons "ISO-8859-9" lc-ltn5) ; Latin-5
))
-
-;;; @ define charset and encoding
-;;;
-
(defun mime/set-charset-and-encoding (lc cs charset encoding)
(setq mime/lc-charset-and-encoding-alist
(put-alist lc (cons charset encoding)
)
dest))
+
+;;; @ functions
+;;;
+
(defun mime/convert-string-to-emacs (charset str)
(let ((cs (cdr (assoc charset mime/charset-coding-system-alist))))
(cond (cs
;;;
-;;; $Id: tm-nemacs.el,v 6.3 1995/08/27 14:24:22 morioka Exp $
+;;; tm-nemacs.el --- tm definitions depended on NEmacs
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-nemacs.el,v 7.1 1995/10/03 04:51:07 morioka Exp $
+;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'emu)
(defvar mime/default-coding-system *junet*)
+(defvar mime/lc-charset-rule-list
+ (list
+ (list (list lc-ascii) "US-ASCII" nil)
+ (list (list lc-ascii lc-jp) "ISO-2022-JP" "B")
+ ))
+
+
+;;; @@ (obsolete)
+;;;
+
(defvar mime/lc-charset-and-encoding-alist
(list (cons lc-ascii nil)
(cons lc-jp '("ISO-2022-JP" . "B"))
;;;
-;;; $Id: tm-orig.el,v 6.3 1995/08/27 14:26:18 morioka Exp $
+;;; tm-orig.el --- tm definitions depended on FSF Original Emacs
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-orig.el,v 7.1 1995/10/03 04:52:16 morioka Exp $
+;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'emu)
(defvar mime/default-coding-system nil)
+(defvar mime/lc-charset-rule-list
+ (list
+ (list (list lc-ascii) "US-ASCII" nil)
+ (list (list lc-ascii lc-ltn1) "ISO-8859-1" "Q")
+ ))
+
+(defvar mime/decoding-charset-list '("US-ASCII" "ISO-8859-1"))
+
+
+;;; @@ (obsolete)
+;;;
+
(defvar mime/lc-charset-and-encoding-alist
(list (cons lc-ascii nil)
(cons lc-ltn1 '("ISO-8859-1" . "Q"))
(defvar mime/latin-lc-list (list lc-ascii lc-ltn1))
-(defvar mime/decoding-charset-list '("US-ASCII" "ISO-8859-1"))
-
;;; @ functions
;;;
;;;
;;; This file is a part of tm (Tools for MIME).
;;;
-;;; $Id: tm-partial.el,v 6.0 1995/09/20 14:39:23 morioka Exp $
+;;; $Id: tm-partial.el,v 6.1 1995/09/26 14:50:54 morioka Exp $
;;;
(require 'tm-view)
;; (make-variable-buffer-local 'mime/content-list)
;; (setq mime/content-list (mime/parse-contents))
(make-variable-buffer-local 'mime::article/content-info)
- (setq mime::article/content-info (mime-viewer/parse))
+ (setq mime::article/content-info (mime/parse-message))
)
(delete-other-windows)
(switch-to-buffer buffer)
;;;
-;;; $Id: tm-rmail.el,v 6.6 1995/06/26 22:52:13 morioka Exp $
+;;; $Id: tm-rmail.el,v 6.7 1995/09/28 06:05:20 morioka Exp $
+;;;
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: mail, news, MIME, multimedia
+;;;
+;;; This file is part of tm (Tools for MIME).
;;;
(require 'tl-header)
(autoload 'mime/Content-Type "tm-view" "parse Content-Type field.")
(autoload 'mime/decode-message-header "tiny-mime" "Decode MIME header." t)
+(setq rmail-message-filter
+ (function
+ (lambda ()
+ (let ((mf (buffer-modified-p))
+ (buffer-read-only nil))
+ (mime/decode-message-header)
+ (set-buffer-modified-p mf)
+ ))))
+
(defun tm-rmail/show-all-header-p ()
(save-restriction
(narrow-to-region (point-min)
(defalias 'tm-rmail/quitting-method 'tm-rmail/quitting-method-to-article)
-(add-hook 'rmail-show-message-hook
- (function
- (lambda ()
- (let ((mf (buffer-modified-p))
- (buffer-read-only nil))
- (mime/decode-message-header)
- (set-buffer-modified-p mf)
- ))))
-
(add-hook 'rmail-mode-hook
(function
(lambda ()
;;; This file is part of tm (Tools for MIME).
;;;
-;;; @ require modules
-;;;
-
(require 'tl-str)
(require 'tl-list)
(require 'tl-atype)
(require 'tl-misc)
(require 'tl-header)
(require 'mel)
-(require 'tiny-mime)
+(require 'tm-ew-d)
(require 'tm-def)
(require 'tm-parse)
;;;
(defconst mime-viewer/RCS-ID
- "$Id: tm-view.el,v 7.6 1995/09/26 11:53:46 morioka Exp $")
+ "$Id: tm-view.el,v 7.9 1995/10/03 04:56:10 morioka Exp $")
(defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
(defconst mime/viewer-version mime-viewer/version)
(if (> he end)
(setq he end)
)
- (setq subj (mime-viewer/get-subject params encoding))
+ (save-restriction
+ (narrow-to-region beg end)
+ (setq subj (mime-viewer/get-subject params encoding))
+ )
(set-buffer obuf)
(setq nb (point))
(narrow-to-region nb nb)
(null (mime::content-info/children cinfo))
)
(set-buffer obuf)
+ (goto-char (point-max))
(mime-viewer/insert-content-subject cnum cinfo ctype params subj)
)
(t (set-buffer obuf))
;;;
-;;; tm-vm.el: tm-MUA for VM
-;;; This version is tested under VM-5.76 with tm-6.20
+;;; tm-vm.el --- tm-MUA for VM
;;;
-;;; Written by MASUTANI Yasuhiro <masutani@me.es.osaka-u.ac.jp>
-;;; Modified by SHIONO <jun@p5.nm.fujitsu.co.jp>
-;;; and Steinar Bang <steinarb@falch.no>
-;;; and Kenji Wakamiya <wkenji@flab.fujitsu.co.jp>
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;;
+;;; Author: MASUTANI Yasuhiro <masutani@me.es.osaka-u.ac.jp>
+;;; and Kenji Wakamiya <wkenji@flab.fujitsu.co.jp>
+;;; modified by SHIONO <jun@p5.nm.fujitsu.co.jp>,
+;;; Steinar Bang <steinarb@falch.no>,
+;;; and MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
+;;;
+;;; This file is part of tm (Tools for MIME).
+;;;
+;;; This version is tested under VM-5.76 with tm-6.20.
;;;
;;; Plese insert (require 'tm-vm) in your .vm or .emacs.
;;;
-(provide 'tm-vm)
(require 'tm-view)
(require 'vm)
(defconst tm-vm/RCS-ID
- "$Id: tm-vm.el,v 6.3 1995/09/26 00:15:07 morioka Exp $")
+ "$Id: tm-vm.el,v 7.0 1995/10/03 05:04:35 morioka Exp $")
(defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
(define-key vm-mode-map "Z" 'tm-vm/view-message)
'vm-virtual-mode
'tm-vm/quit-view-message)
+
;;; @ for MIME header
;;;
;; If you don't use tiny-mime patch for VM (by RIKITAKE Kenji
;; (setq vm-summary-format "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c, %I\"%UA\"\n")
;; (defun vm-summary-function-A (m)
-;; (mime/decode-string (vm-su-subject m)))
+;; (mime/decode-encoded-words-string (vm-su-subject m)))
;;; @ functions
(set-buffer (car vbufs))
(vm-preview-current-message)
(setq vbufs (cdr vbufs))))))
+
+
+;;; @ end
+;;;
+
+(provide 'tm-vm)