From 0f272975736cf4782907fb75f5efedb15ec6ea22 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 9 Mar 1998 17:01:52 +0000 Subject: [PATCH] tm 7.49. --- ChangeLog | 104 ++++++++++++++++++++++++++++++++++++++ Makefile | 6 +-- TM-CFG | 6 +-- doc/tm-edit=en.texi | 6 +-- doc/tm-edit=ja.texi | 6 +-- doc/tm-gnus_en.texi | 5 +- doc/tm-gnus_ja.texi | 6 +-- doc/tm-mh-e_en.texi | 5 +- doc/tm-mh-e_ja.texi | 6 +-- doc/tm_en.texi | 5 +- doc/tm_ja.texi | 6 +-- gnus/ChangeLog | 16 ++++++ gnus/Makefile | 2 +- gnus/s-path | 2 +- gnus/tm-gnus3.el | 9 ++-- gnus/tm-sgnus.el | 45 +---------------- inst-tm | 23 +++++---- mime-setup.el.in | 12 ++++- tm-edit.el | 138 +++++++-------------------------------------------- tm-ew-e.el | 17 +++---- tm-image.el | 10 ++-- tm-mail.el | 7 ++- tm-parse.el | 14 +++--- tm-setup.el | 4 +- tm-view.el | 22 ++++---- tm-vm.el | 100 +++++++++++++++++++++++++++++++++++-- 26 files changed, 335 insertions(+), 247 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2886ebe..571e96e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,107 @@ +Mon Apr 15 09:10:01 1996 MORIOKA Tomohiko + + * tl: Version 7.19.1 was released. + * tm: Version 7.49 was released. + * tm/gnus: Version 7.49.2 was released. + +Sun Apr 14 15:42:14 1996 MORIOKA Tomohiko + + * tm-parse.el (mime/parse-Content-Disposition): use function + `nreverse' instead of `reverse'. + +Sun Apr 14 15:16:25 1996 MORIOKA Tomohiko + + * tm-parse.el (mime/parse-Content-Type): use function `nreverse' + instead of `reverse'. + +Sun Apr 14 00:21:21 1996 MORIOKA Tomohiko + + * tm-vm.el (vm-yank-message): use variable `running-xemacs' + + * tm-view.el, tm-image.el, tm-mail.el, tm-setup.el: use variable + `running-xemacs' + +Sat Apr 13 23:32:26 1996 MORIOKA Tomohiko + + * tm-view.el (mime-viewer/make-preview-buffer): + use `while' instead of mapcar. + + * tm-vm.el (vm-yank-message): redefine for MIME preview buffer. + +Sat Apr 13 04:04:12 1996 MORIOKA Tomohiko + + * mime-setup.el.in (message-header-hook): add function + `mime/encode-message-header' (cf.[tm-ja: + + * tm-ew-e.el (mime/encode-message-header): regard `(point-max)' as + end of message header if variable `mail-header-separator' is not + found. + +Thu Apr 11 17:24:11 1996 MORIOKA Tomohiko + + * doc/tm_en.texi: fixed problem about top node. + + * doc/tm-mh-e_en.texi: fixed problem about top node. + + * doc/tm-gnus_en.texi: fixed problem about top node. + + * doc/tm-edit=en.texi: fixed problem in TeX compiling. + + * doc/tm-edit=ja.texi: fixed problem in TeX compiling. + +Thu Apr 11 16:20:20 1996 MORIOKA Tomohiko + + * mime-setup.el.in (message-forward-start-separator): Function + `mime-make-tag' must be called after tm-edit is loaded. + + * mime-setup.el.in: + setting for variable `message-forward-start-separator'. + setting for variable `message-forward-end-separator'. + + * tm-edit.el (mime-editor/encode-string): New function. + Variable `mime-string-encoder' and its implementations were + deleted. + +Wed Apr 10 02:06:30 1996 Katsumi Yamaoka + + * doc/tm_ja.texi: fixed problem about top node. + (cf. [tm-ja:1706]) + + * doc/tm-mh-e_ja.texi: fixed problem about top node. + (cf. [tm-ja:1706]) + + * doc/tm-gnus_ja.texi: fixed problem about top node. + (cf. [tm-ja:1706]) + +Tue Apr 9 17:28:49 1996 MORIOKA Tomohiko + + * Makefile (GOMI): add mime-setup.el, mime-setup.el~ and + #mime-setup.el#; remove load-path. + +Tue Apr 9 17:13:36 1996 MORIOKA Tomohiko + + * inst-tm (compile-tm): call `make gnus3' for Emacs 18. + +Mon Apr 8 12:28:17 1996 MORIOKA Tomohiko + + * inst-tm (make-mime-setup): check unnecessary add-path. + +Sun Apr 7 20:12:27 1996 MORIOKA Tomohiko + + * tm-view.el: (mime-viewer/default-showing-Content-Type-list): + "message/delivery-status" was added to default value. + +Wed Apr 3 15:35:44 1996 MORIOKA Tomohiko + + * tm-image.el: add-hook only if variable + `mime-preview/x-face-function' is not nil. + (cf. [tm-en:416]) + +Thu Mar 28 18:55:18 1996 Oscar Figueiredo + + * tm-vm.el (vm-yank-message): redefine for MIME preview buffer. + + Thu Mar 28 08:42:34 1996 MORIOKA Tomohiko * tm: Version 7.48.3 was released. diff --git a/Makefile b/Makefile index 55b87d5..a01026e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 7.16 1996/03/04 09:24:23 morioka Exp morioka $ +# $Id: Makefile,v 7.17 1996/04/09 17:28:49 morioka Exp morioka $ # MAKE = make @@ -11,7 +11,7 @@ EMACS = emacs BINS = src/ol2 src/decode-b UTILS = $(BINS) -GOMI = $(BINS) *.elc loadpath +GOMI = $(BINS) mime-setup.el mime-setup.el~ \#mime-setup.el\# *.elc FLAGS = -batch -q -no-site-file TM_FILES = tm/README.en tm/ChangeLog \ @@ -45,7 +45,7 @@ TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/tl-els tl/*.el \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.48.3.tar.gz +TARFILE = tm7.49.tar.gz elc: $(EMACS) $(FLAGS) -l inst-tm -f compile-tm diff --git a/TM-CFG b/TM-CFG index 1290100..56143ac 100644 --- a/TM-CFG +++ b/TM-CFG @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: TM-CFG,v 3.0 1996/03/27 19:38:12 morioka Exp $ +;;; $Id: TM-CFG,v 3.0 1996/03/27 19:38:12 morioka Exp morioka $ ;;; (setq load-path (append @@ -42,8 +42,8 @@ ;;; ;; Please specify install path prefix. -;;(setq PREFIX "~/") ; install to you home directory -(setq PREFIX "/usr/local/") ; install to shared directory +(setq PREFIX "~/") ; install to you home directory +;;(setq PREFIX "/usr/local/") ; install to shared directory ;; Please specify tm package prefix [optional] (setq TM_PACKAGE_PREFIX "") diff --git a/doc/tm-edit=en.texi b/doc/tm-edit=en.texi index 676fc19..416fcf3 100644 --- a/doc/tm-edit=en.texi +++ b/doc/tm-edit=en.texi @@ -1,4 +1,4 @@ -@c $Id: tm-edit=en.texi,v 1.1 1996/02/28 14:34:05 morioka Exp $ +@c $Id: tm-edit=en.texi,v 2.0 1996/04/11 17:24:11 morioka Exp $ @node tm-edit, encoded-word, tm-view, Top @comment node-name, next, previous, up @@ -65,13 +65,13 @@ multi-part tags represent multi part. They consist of a pair of @emph{multi-part beginning tag}'s form is following: @example - --<>-{ + --<>-@{ @end example @emph{multi-part ending tag}'s form is following: @example - --}-<> + --@}-<> @end example A region from multi-part beginning tag to multi-part ending tag is diff --git a/doc/tm-edit=ja.texi b/doc/tm-edit=ja.texi index 68e02c1..0dc3dcb 100644 --- a/doc/tm-edit=ja.texi +++ b/doc/tm-edit=ja.texi @@ -1,4 +1,4 @@ -@c $Id: tm-edit=ja.texi,v 3.0 1996/02/28 13:41:00 morioka Exp $ +@c $Id: tm-edit=ja.texi,v 4.0 1996/04/11 17:18:48 morioka Exp $ @node tm-edit, encoded-word, tm-view, Top @comment node-name, next, previous, up @@ -72,14 +72,14 @@ field multi-part tag ¤Ï multi part ¤òɽ¸½¤¹¤ë¤¿¤á¤Î tag ¤Ç¡¢ @example - --<>-{ + --<>-@{ @end example ¤È¤¤¤¦·Á¤Î @emph{multi-part ³«»Ï tag} ¤È¸Æ¤Ð¤ì¤ë multi part ¤Î³«»Ï¤ò¼¨ ¤¹ tag ¤È @example - --}-<> + --@}-<> @end example diff --git a/doc/tm-gnus_en.texi b/doc/tm-gnus_en.texi index 62f0490..7ed0ea0 100644 --- a/doc/tm-gnus_en.texi +++ b/doc/tm-gnus_en.texi @@ -6,16 +6,17 @@ @titlepage @title{tm-gnus} @author{MORIOKA Tomohiko} -@code{$Id: tm-gnus_en.texi,v 6.0 1996/03/27 23:04:30 morioka Exp morioka $} +@code{$Id: tm-gnus_en.texi,v 7.0 1996/04/11 17:20:24 morioka Exp $} @end titlepage @node Top, Introduction, (tm_en.info)tm-MUA, (tm_en.info)tm-MUA +@top tm-gnus 7.25 Reference manual + @comment node-name, next, previous, up @ifinfo This file documents tm-gnus, a MIME extension for GNUS and Gnus. -@top tm-gnus 7.25 Reference manual @end ifinfo @menu diff --git a/doc/tm-gnus_ja.texi b/doc/tm-gnus_ja.texi index abe8a75..17bd20a 100644 --- a/doc/tm-gnus_ja.texi +++ b/doc/tm-gnus_ja.texi @@ -6,16 +6,16 @@ @titlepage @title{tm-gnus} @author{¼é²¬ ÃÎɧ} -@code{$Id: tm-gnus_ja.texi,v 6.0 1996/03/27 23:04:01 morioka Exp morioka $} +@code{$Id: tm-gnus_ja.texi,v 7.0 1996/04/11 16:43:31 morioka Exp $} @end titlepage @node Top, Introduction, (tm_ja.info)tm-MUA, (tm_ja.info)tm-MUA +@top tm-gnus 7.25 Reference manual + @comment node-name, next, previous, up @ifinfo This file documents tm-gnus, a MIME extension for GNUS and Gnus. - -@top tm-gnus 7.25 Reference manual @end ifinfo @menu diff --git a/doc/tm-mh-e_en.texi b/doc/tm-mh-e_en.texi index 6d13e1a..a33c432 100644 --- a/doc/tm-mh-e_en.texi +++ b/doc/tm-mh-e_en.texi @@ -6,16 +6,17 @@ @titlepage @title{tm-mh-e} @author{MORIOKA Tomohiko} -@code{$Id: tm-mh-e_en.texi,v 4.0 1996/03/27 23:05:17 morioka Exp morioka $} +@code{$Id: tm-mh-e_en.texi,v 5.0 1996/04/11 17:21:18 morioka Exp $} @end titlepage @node Top, Introduction, (tm_en.info)tm-MUA, (tm_en.info)tm-MUA +@top tm-mh-e 7.44 Reference manual + @comment node-name, next, previous, up @ifinfo This file documents tm-mh-e, a MIME extension for mh-e. -@top tm-mh-e 7.44 Reference manual @end ifinfo @menu diff --git a/doc/tm-mh-e_ja.texi b/doc/tm-mh-e_ja.texi index 1cc83e0..883dbc1 100644 --- a/doc/tm-mh-e_ja.texi +++ b/doc/tm-mh-e_ja.texi @@ -6,16 +6,16 @@ @titlepage @title{tm-mh-e} @author{¼é²¬ ÃÎɧ} -@code{$Id: tm-mh-e_ja.texi,v 3.0 1996/03/27 23:06:07 morioka Exp morioka $} +@code{$Id: tm-mh-e_ja.texi,v 4.0 1996/04/11 16:46:54 morioka Exp $} @end titlepage @node Top, Introduction, (tm_ja.info)tm-MUA, (tm_ja.info)tm-MUA +@top tm-mh-e 7.44 Reference manual + @comment node-name, next, previous, up @ifinfo This file documents tm-mh-e, a MIME extension for mh-e. - -@top tm-mh-e 7.44 Reference manual @end ifinfo @menu diff --git a/doc/tm_en.texi b/doc/tm_en.texi index acc72cd..867ec3c 100644 --- a/doc/tm_en.texi +++ b/doc/tm_en.texi @@ -6,16 +6,17 @@ @titlepage @title tm Manual (English Version) @author by MORIOKA Tomohiko -@code{$Id: tm_en.texi,v 7.12 1996/03/27 22:58:47 morioka Exp morioka $} +@code{$Id: tm_en.texi,v 7.13 1996/04/11 17:22:35 morioka Exp $} @end titlepage @node Top, Introduction, (dir), (dir) +@top tm 7.32 Reference manual + @comment node-name, next, previous, up @ifinfo This file documents tm, a MIME package for GNU Emacs. -@top tm 7.32 Reference manual @end ifinfo @menu diff --git a/doc/tm_ja.texi b/doc/tm_ja.texi index cb12ba6..d85441b 100644 --- a/doc/tm_ja.texi +++ b/doc/tm_ja.texi @@ -6,17 +6,17 @@ @titlepage @title{tm Manual¡ÊÆüËܸìÈÇ¡Ë} @author{¼é²¬ ÃÎɧ Ãø} -@code{$Id: tm_ja.texi,v 7.6 1996/03/27 22:59:32 morioka Exp morioka $} +@code{$Id: tm_ja.texi,v 7.7 1996/04/11 16:48:21 morioka Exp $} @end titlepage @node Top, Introduction, (dir), (dir) +@top tm 7.32 Reference manual + @comment node-name, next, previous, up @ifinfo This file documents tm, a MIME package for GNU Emacs. -@top tm 7.32 Reference manual - GNU Emacs ¤Ç MIME ¤ò³Ú¤·¤à¤¿¤á¤Î package ¤Ç¤¢¤ë `tm' ¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ ¤¹¡£ @end ifinfo diff --git a/gnus/ChangeLog b/gnus/ChangeLog index 76c4c15..a401b52 100644 --- a/gnus/ChangeLog +++ b/gnus/ChangeLog @@ -1,3 +1,19 @@ +Mon Apr 15 09:08:57 1996 MORIOKA Tomohiko + + * tm/gnus: Version 7.49.2 was released. + +Thu Apr 11 16:10:56 1996 MORIOKA Tomohiko + + * tm-sgnus.el: Function `tm-gnus/forward-insert-buffer' was + deleted. + +Mon Apr 8 12:26:21 1996 MORIOKA Tomohiko + + * tm-gnus3.el (tm-gnus/article-set-mode-line): Function + `rightful-boundary-short-string' was obsoleted; use function + `truncate-string'. (cf. [tm-ja:1693]) + + Thu Mar 28 08:44:31 1996 MORIOKA Tomohiko * tm/gnus: Version 7.49.1 was released. diff --git a/gnus/Makefile b/gnus/Makefile index 6784810..08f172d 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -30,7 +30,7 @@ FILES = tm/gnus/Makefile tm/gnus/*-path tm/gnus/mk-tgnus \ tm/gnus/*.el tm/gnus/ChangeLog tm/doc/tm-gnus*.texi -TARFILE = tm-gnus7.49.1.tar +TARFILE = tm-gnus7.49.2.tar gnus: diff --git a/gnus/s-path b/gnus/s-path index 88f713f..12a2249 100644 --- a/gnus/s-path +++ b/gnus/s-path @@ -9,7 +9,7 @@ ;; please edit ;; It is relative style. Added path is searched from load-path. -(add-path "sgnus-0.57/lisp/" 'all-paths) +(add-path "sgnus-0.69/lisp/" 'all-paths) ;; It is absolute style. ;; (add-path "/usr/local/share/emacs/site-lisp/sgnus/lisp/") diff --git a/gnus/tm-gnus3.el b/gnus/tm-gnus3.el index 675b358..25f56fe 100644 --- a/gnus/tm-gnus3.el +++ b/gnus/tm-gnus3.el @@ -7,7 +7,7 @@ ;;; Author: MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1993/11/20 -;;; Version: $Revision: 7.7 $ +;;; Version: $Revision: 7.8 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -46,7 +46,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus3.el,v 7.7 1996/03/04 08:20:48 morioka Exp $") + "$Id: tm-gnus3.el,v 7.8 1996/04/08 12:26:21 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 3")) @@ -105,9 +105,8 @@ If you don't like it, define your own gnus-article-set-mode-line." gnus-newsgroup-name (if gnus-current-article (format "/%d" gnus-current-article) "") - (rightful-boundary-short-string subject - (min (string-width subject) - maxlen)) + (truncate-string subject (min (string-width subject) + maxlen)) (if (> (string-width subject) maxlen) "..." "") (make-string (max 0 (- 17 (string-width subject))) ? ) ))) diff --git a/gnus/tm-sgnus.el b/gnus/tm-sgnus.el index 6f3934a..34843b9 100644 --- a/gnus/tm-sgnus.el +++ b/gnus/tm-sgnus.el @@ -7,7 +7,7 @@ ;;; Author: MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/09/24 -;;; Version: $Revision: 7.49 $ +;;; Version: $Revision: 7.50 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -41,7 +41,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-sgnus.el,v 7.49 1996/03/04 08:17:44 morioka Exp $") + "$Id: tm-sgnus.el,v 7.50 1996/04/11 16:10:56 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for September")) @@ -298,47 +298,6 @@ This variable is set to `gnus-show-mime'.") )) -;;; @ for tm-edit -;;; - -(defun tm-gnus/forward-insert-buffer (buffer) - (save-excursion - (save-restriction - (if gnus-signature-before-forwarded-message - (goto-char (point-max)) - (goto-char (point-min)) - (re-search-forward - (concat "^" (regexp-quote mail-header-separator) "$")) - (forward-line 1)) - ;; Narrow to the area we are to insert. - (narrow-to-region (point) (point)) - ;; Insert the separators and the forwarded buffer. - (mime-editor/insert-tag "message" "rfc822") - (insert-buffer-substring buffer) - ;; Delete any invisible text. - (goto-char (point-min)) - (let (beg) - (while (setq beg (next-single-property-change (point) 'invisible)) - (goto-char beg) - (delete-region beg (or (next-single-property-change - (point) 'invisible) - (point-max)))))))) - -(call-after-loaded - 'mime-setup - (lambda () - (cond ((string-match "XEmacs" emacs-version) - (require 'gnus-msg) - (fset 'gnus-forward-insert-buffer 'tm-gnus/forward-insert-buffer) - ) - (t - (eval-after-load - "gnus-msg" - '(fset 'gnus-forward-insert-buffer 'tm-gnus/forward-insert-buffer) - ) - )))) - - ;;; @ for BBDB ;;; diff --git a/inst-tm b/inst-tm index ec3813e..8df092c 100644 --- a/inst-tm +++ b/inst-tm @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: inst-tm,v 3.1 1996/03/11 14:50:53 morioka Exp morioka $ +;;; $Id: inst-tm,v 3.3 1996/04/09 17:13:36 morioka Exp $ ;;; (load-file "TM-CFG") @@ -87,17 +87,20 @@ (compile-el-files "./" tm-modules) (compile-el-files "mh-e/" tm-mh-e-modules) (compile-tm-gnus "gnus") - (cond ((< emacs-major-version 19) - (compile-tm-gnus "gnus4") - ) - ((or (>= emacs-minor-version 30) - (string-match "XEmacs" emacs-version)) + (cond ((string-match "XEmacs" emacs-version) (compile-tm-gnus "sgnus") ) - (t - (compile-tm-gnus "gnus4") - (compile-tm-gnus "gnus5") - )) + (t (cond ((<= emacs-major-version 18) + (compile-tm-gnus "gnus3") + (compile-tm-gnus "gnus4") + ) + ((< emacs-minor-version 30) + (compile-tm-gnus "gnus4") + (compile-tm-gnus "gnus5") + ) + (t + (compile-tm-gnus "sgnus") + )))) (compile-el-files "./" '("mime-setup")) ) diff --git a/mime-setup.el.in b/mime-setup.el.in index de6ab66..fe6ee8a 100644 --- a/mime-setup.el.in +++ b/mime-setup.el.in @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: mime-setup.el.in,v 7.16 1996/03/28 08:42:34 morioka Exp $ +;;; $Id: mime-setup.el.in,v 7.19 1996/04/13 04:04:12 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -130,6 +130,16 @@ (add-hook 'message-setup-hook 'mime/editor-mode) (add-hook 'message-send-hook 'mime-editor/maybe-translate) +(add-hook 'message-header-hook 'mime/encode-message-header) + +(call-after-loaded + 'tm-edit + (function + (lambda () + (setq message-forward-start-separator + (concat (mime-make-tag "message" "rfc822") "\n")) + ))) +(setq message-forward-end-separator "") ;;; @ end diff --git a/tm-edit.el b/tm-edit.el index 09f68ae..a8647df 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -8,7 +8,7 @@ ;;; MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/08/21 renamed from mime.el -;;; Version: $Revision: 7.48 $ +;;; Version: $Revision: 7.49 $ ;;; Keywords: mail, news, MIME, multimedia, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -122,7 +122,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.48 1996/03/13 17:55:33 morioka Exp $") + "$Id: tm-edit.el,v 7.49 1996/04/11 00:39:12 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -149,18 +149,6 @@ If non-nil, the text tag is not inserted unless something different.") (defvar mime-auto-hide-body t "*Hide non-textual body encoded in base64 after insertion if non-nil.") -(defvar mime-string-encoder - (cond ((boundp 'NEMACS) - (function mime-string-encoder-for-nemacs)) - ((featurep 'mule) - (function mime-string-encoder-for-mule)) - ((string-match "^19\\." emacs-version) - (function mime-string-encoder-for-emacs19)) - (t ;ASCII only emacs - (function mime-string-encoder-for-emacs18))) - "*Function to encode a string for given encoding method. -The method is a form of (CHARSET . ENCODING).") - (defvar mime-voice-recorder (function mime-voice-recorder-for-sun) "*Function to record a voice message and return a buffer that contains it.") @@ -748,10 +736,6 @@ User customizable variables (not documented all of them): Hide a non-textual body message encoded in base64 after insertion if non-nil. - mime-string-encoder - Specifies a function to encode a string for given encoding method. - The method is a form of (CHARSET . ENCODING). - mime-voice-recorder Specifies a function to record a voice message and return a buffer that contains it. The function mime-voice-recorder-for-sun is for @@ -1437,16 +1421,17 @@ several lines." (buffer-substring (point-min) (point-max)) (kill-buffer (current-buffer))))) -(defun mime-decode-string (encoding string) - "Using ENCODING decode a STRING." - (save-excursion - (set-buffer (get-buffer-create " *MIME decoding*")) - (erase-buffer) - (insert string) - (mime-decode-region encoding (point-min) (point-max)) - (prog1 - (buffer-substring (point-min) (point-max)) - (kill-buffer (current-buffer))))) +(defun mime-editor/encode-string (method string) + "For given METHOD that is a cons of charset and encoding, +encode a STRING. [tm-edit.el]" + (let* ((charset (car method)) + (encoding (cdr method))) + (setq string (mime/convert-string-from-emacs string charset)) + (cond ((stringp encoding) + (mime-encode-string encoding string) + ) + (t string) + ))) (defun mime-flag-region (from to flag) "Hides or shows lines from FROM to TO, according to FLAG. @@ -1984,8 +1969,9 @@ Content-Transfer-Encoding: 7bit (beg (mime-editor/content-beginning)) (end (mime-editor/content-end)) (body (buffer-substring beg end)) - (encoded (funcall mime-string-encoder - (cons charset encoding) body))) + (encoded (mime-editor/encode-string + (cons charset encoding) body)) + ) (if (not (string-equal body encoded)) (progn (goto-char beg) @@ -2002,8 +1988,9 @@ Content-Transfer-Encoding: 7bit (beg (mime-editor/content-beginning)) (end (mime-editor/content-end)) (body (buffer-substring beg end)) - (encoded (funcall mime-string-encoder - (cons nil encoding) body))) + (encoded (mime-editor/encode-string + (cons nil encoding) body)) + ) (if (not (string-equal body encoded)) (progn (goto-char beg) @@ -2029,93 +2016,6 @@ Content-Transfer-Encoding: 7bit ;;; Platform dependent functions ;;; -;; Emacs 18 implementations - -(defun mime-string-encoder-for-emacs18 (method string) - "For given METHOD that is a cons of charset and encoding, encode a STRING." - (let ((charset (car method)) - (encoding (cdr method))) - (cond ((stringp encoding) - (mime-encode-string encoding string)) - ;; Return string without any encoding. - (t string) - ))) - - -;; Emacs 19 implementations - -(defun mime-string-encoder-for-emacs19 (method string) - "For given METHOD that is a cons of charset and encoding, encode a STRING." - (let ((charset (car method)) - (encoding (cdr method))) - (cond ((stringp encoding) - (mime-encode-string encoding string)) - ;; Return string without any encoding. - (t string) - ))) - - -;; NEmacs implementations - -(defun mime-string-encoder-for-nemacs (method string) - "For given METHOD that is a cons of charset and encoding, encode a STRING. -US-ASCII and ISO-2022-JP are supported on NEmacs." - (let ((charset (car method)) - (encoding (cdr method))) - (cond ((stringp encoding) - (mime-encode-string encoding - ;; Convert internal (EUC) to JIS code. - (convert-string-kanji-code string 3 2) - )) - ;; NEmacs can convert into ISO-2022-JP automatically, - ;; but can do it myself as follows: - ;;(t (convert-string-kanji-code string 3 2)) - - ;; Return string without any encoding. - (t string) - ))) - - -;; Mule implementations -;; Thanks to contributions by wkenji@flab.fujitsu.co.jp (Kenji -;; WAKAMIYA) and handa@etl.go.jp (Kenichi Handa). - -(defun mime-string-encoder-for-mule (method string) - "For given METHOD that is a cons of charset and encoding, encode a -STRING. US-ASCII, ISO-8859-* (except for ISO-8859-6), ISO-2022-JP, -ISO-2022-JP-2 and ISO-2022-INT-1 are supported on Mule. Either of -charset ISO-2022-JP-2 or ISO-2022-INT-1 is used for multilingual -text." - (let* ((charset (car method)) - (encoding (cdr method)) - (coding-system - (cdr (assoc (and (stringp charset) (upcase charset)) - '(("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-6" . *iso-8859-6*) - ("ISO-8859-7" . *iso-8859-7*) - ("ISO-8859-8" . *iso-8859-8*) - ("ISO-8859-9" . *iso-8859-9*) - ("ISO-2022-JP" . *junet*) - ("ISO-2022-JP-2" . *iso-2022-ss2-7*) - ("ISO-2022-KR" . *korean-mail*) - ("ISO-2022-INT-1" . *iso-2022-int-1*) - ))))) - ;; In bilingual environment it may be unnecessary to convert the - ;; coding system of the string unless transfer encoding is - ;; required since such conversion may be performed by mule - ;; automatically. - (if (not (null coding-system)) - (setq string (code-convert-string string *internal* coding-system))) - (if (stringp encoding) - (setq string (mime-encode-string encoding string))) - string - )) - - ;; Sun implementations (defun mime-voice-recorder-for-sun () diff --git a/tm-ew-e.el b/tm-ew-e.el index 56c6449..46cbc6d 100644 --- a/tm-ew-e.el +++ b/tm-ew-e.el @@ -6,7 +6,7 @@ ;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko -;;; Version: $Revision: 7.13 $ +;;; Version: $Revision: 7.14 $ ;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -36,7 +36,7 @@ ;;; (defconst tm-ew-e/RCS-ID - "$Id: tm-ew-e.el,v 7.13 1996/03/04 08:55:23 morioka Exp $") + "$Id: tm-ew-e.el,v 7.14 1996/04/13 04:02:36 morioka Exp $") (defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID)) @@ -521,13 +521,12 @@ (save-excursion (save-restriction (narrow-to-region (goto-char (point-min)) - (progn - (re-search-forward - (concat - "^" (regexp-quote mail-header-separator) "$") - nil t) - (match-beginning 0) - )) + (if (re-search-forward + (concat + "^" (regexp-quote mail-header-separator) "$") + nil t) + (match-beginning 0) + (point-max))) (goto-char (point-min)) (let (beg end field) (while (re-search-forward rfc822/field-top-regexp nil t) diff --git a/tm-image.el b/tm-image.el index 361a60b..a0d3b8d 100644 --- a/tm-image.el +++ b/tm-image.el @@ -10,7 +10,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/12/15 ;;; Version: -;;; $Id: tm-image.el,v 7.0 1996/02/28 13:13:27 morioka Exp $ +;;; $Id: tm-image.el,v 7.2 1996/04/14 00:14:46 morioka Exp $ ;;; ;;; Keywords: mail, news, MIME, multimedia, image, picture ;;; @@ -39,7 +39,7 @@ (require 'tm-view) -(cond ((string-match "XEmacs" emacs-version) +(cond (running-xemacs (require 'xpm) (require 'annotations) @@ -148,8 +148,10 @@ (defvar mime-viewer/x-face-to-xbm-command (concat mime-viewer/x-face-to-pbm-command " | pbmtoxbm")) -(add-hook 'mime-viewer/content-header-filter-hook - mime-preview/x-face-function) +(if mime-preview/x-face-function + (add-hook 'mime-viewer/content-header-filter-hook + mime-preview/x-face-function) + ) (defun mime-preview/x-face-function-use-highlight-headers () (highlight-headers (point-min) (re-search-forward "^$" nil t) t) diff --git a/tm-mail.el b/tm-mail.el index 0ef0bf5..df67ad3 100644 --- a/tm-mail.el +++ b/tm-mail.el @@ -8,7 +8,7 @@ ;;; and Neal Becker ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/11/27 -;;; Version: $Id: tm-mail.el,v 4.0 1996/02/27 10:13:50 morioka Exp $ +;;; Version: $Id: tm-mail.el,v 5.0 1996/04/14 00:17:05 morioka Exp $ ;;; Keywords: mail, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -61,10 +61,9 @@ )) )) -(defvar tm-mail/use-xemacs-popup-menu t) +(defvar tm-mail/use-xemacs-popup-menu running-xemacs) -(if (and (string-match "XEmacs\\|Lucid" emacs-version) - tm-mail/use-xemacs-popup-menu) +(if (and running-xemacs tm-mail/use-xemacs-popup-menu) (cond ((string-match "19.14" emacs-version) (setq mail-menubar-menu diff --git a/tm-parse.el b/tm-parse.el index 1401f17..6f27844 100644 --- a/tm-parse.el +++ b/tm-parse.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-parse.el,v 7.1 1995/12/21 18:13:54 morioka Exp $ +;;; $Id: tm-parse.el,v 7.3 1996/04/14 15:42:14 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -61,10 +61,10 @@ ret dest) (setq str (substring str e)) (while (setq ret (mime/parse-parameter str)) - (setq dest (cons (car ret) dest)) - (setq str (cdr ret)) + (setq dest (cons (car ret) dest) + str (cdr ret)) ) - (cons ctype (reverse dest)) + (cons ctype (nreverse dest)) ))) (defconst mime::dtype-regexp (concat "^" mime/disposition-type-regexp)) @@ -78,10 +78,10 @@ ret dest) (setq str (substring str e)) (while (setq ret (mime/parse-parameter str)) - (setq dest (cons (car ret) dest)) - (setq str (cdr ret)) + (setq dest (cons (car ret) dest) + str (cdr ret)) ) - (cons ctype (reverse dest)) + (cons ctype (nreverse dest)) ))) diff --git a/tm-setup.el b/tm-setup.el index 36c98ad..2fbb759 100644 --- a/tm-setup.el +++ b/tm-setup.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tm-setup.el,v 7.1 1995/12/20 15:27:35 morioka Exp $ +;;; $Id: tm-setup.el,v 7.2 1996/04/14 00:18:09 morioka Exp $ ;;; (require 'tl-misc) @@ -34,7 +34,7 @@ (autoload 'mime-viewer/filter-text/enriched "tm-rich") ;; for image/* - (if (string-match "XEmacs" emacs-version) + (if running-xemacs (require 'tm-image) ) diff --git a/tm-view.el b/tm-view.el index dd81d62..3d6626b 100644 --- a/tm-view.el +++ b/tm-view.el @@ -8,7 +8,7 @@ ;;; modified by Steven L. Baur ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;;; Version: $Revision: 7.43 $ +;;; Version: $Revision: 7.46 $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -44,7 +44,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.43 1996/03/06 12:26:20 morioka Exp $") + "$Id: tm-view.el,v 7.46 1996/04/14 00:19:59 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -107,6 +107,7 @@ (defvar mime-viewer/default-showing-Content-Type-list '("text/plain" nil "text/richtext" "text/enriched" "text/x-latex" "application/x-latex" + "message/delivery-status" "application/pgp" "text/x-pgp" "application/octet-stream" "application/x-selection" "application/x-comment")) @@ -410,17 +411,16 @@ The compressed face will be piped to this command.") (setq mime::preview/original-major-mode mode) (setq major-mode 'mime/viewer-mode) (setq mode-name "MIME-View") - (setq dest - (mapcar - (function - (lambda (content) - (mime-viewer/display-content content cinfo the-buf obuf) - )) - pcl)) + (while pcl + (setq dest + (cons (mime-viewer/display-content (car pcl) cinfo the-buf obuf) + dest) + pcl (cdr pcl)) + ) (set-buffer-modified-p nil) (setq buffer-read-only t) (set-buffer the-buf) - (list obuf dest) + (list obuf (nreverse dest)) )) (defun mime-viewer/display-content (content cinfo ibuf obuf) @@ -759,7 +759,7 @@ The compressed face will be piped to this command.") (define-key mime/viewer-mode-map mouse-button-2 (function tm:button-dispatcher)) ) - (cond ((string-match "XEmacs\\|Lucid" emacs-version) + (cond (running-xemacs (defvar mime-viewer/xemacs-popup-menu (cons mime-viewer/menu-title (mapcar (function diff --git a/tm-vm.el b/tm-vm.el index e4331ad..acc728c 100644 --- a/tm-vm.el +++ b/tm-vm.el @@ -4,7 +4,8 @@ ;;; Copyright (C) 1994 MASUTANI Yasuhiro ;;; Copyright (C) 1995 WAKAMIYA Kenji ;;; Copyright (C) 1995,1996 KOBAYASHI Shuhei -;;; +;;; Copyright (C) 1996 Oscar Figueiredo +;;; ;;; Author: MASUTANI Yasuhiro ;;; Kenji Wakamiya ;;; MORIOKA Tomohiko @@ -15,7 +16,7 @@ ;;; Rob Kooper ;;; Maintainer: Shuhei KOBAYASHI ;;; Created: 1994/10/29 -;;; Version: $Revision: 7.48 $ +;;; Version: $Revision: 7.50 $ ;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -42,7 +43,7 @@ (require 'vm) (defconst tm-vm/RCS-ID - "$Id: tm-vm.el,v 7.48 1996/03/11 15:21:25 morioka Exp $") + "$Id: tm-vm.el,v 7.50 1996/04/14 00:21:21 morioka Exp $") (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) (define-key vm-mode-map "Z" 'tm-vm/view-message) @@ -560,6 +561,99 @@ tm-vm uses `vm-select-message-hook', use this hook instead.") (set-alist 'mime-viewer/over-to-next-method-alist 'vm-virtual-mode 'tm-vm/next-message) +;;; @@ vm-yank-message +;;; +;; 1996/3/28 by Oscar Figueiredo +(defun vm-yank-message (message) + "Yank message number N into the current buffer at point. +When called interactively N is always read from the minibuffer. When +called non-interactively the first argument is expected to be a +message struct. + +This command is meant to be used in VM created Mail mode buffers; the +yanked message comes from the mail buffer containing the message you +are replying to, forwarding, or invoked VM's mail command from. + +All message headers are yanked along with the text. Point is +left before the inserted text, the mark after. Any hook +functions bound to mail-citation-hook are run, after inserting +the text and setting point and mark. For backward compatibility, +if mail-citation-hook is set to nil, `mail-yank-hooks' is run +instead. + +If mail-citation-hook and mail-yank-hooks are both nil, this +default action is taken: the yanked headers are trimmed as +specified by vm-included-text-headers and +vm-included-text-discard-header-regexp, and the value of +vm-included-text-prefix is prepended to every yanked line." + (interactive + (list + ;; What we really want for the first argument is a message struct, + ;; but if called interactively, we let the user type in a message + ;; number instead. + (let (mp default + (result 0) + prompt + (last-command last-command) + (this-command this-command)) + (save-excursion + (vm-select-folder-buffer) + (setq default (and vm-message-pointer + (vm-number-of (car vm-message-pointer))) + prompt (if default + (format "Yank message number: (default %s) " + default) + "Yank message number: ")) + (while (zerop result) + (setq result (read-string prompt)) + (and (string= result "") default (setq result default)) + (setq result (string-to-int result))) + (if (null (setq mp (nthcdr (1- result) vm-message-list))) + (error "No such message."))) + (car mp)))) + (if (not (bufferp vm-mail-buffer)) + (error "This is not a VM Mail mode buffer.")) + (if (null (buffer-name vm-mail-buffer)) + (error "The folder buffer containing message %d has been killed." + (vm-number-of message))) + (vm-display nil nil '(vm-yank-message) '(vm-yank-message composing-message)) + (setq message (vm-real-message-of message)) + (let ((b (current-buffer)) (start (point)) end) + (save-restriction + (widen) + (save-excursion + (set-buffer (vm-buffer-of message)) + (let* ((mbuf (current-buffer)) + (pbuf (and mime::article/preview-buffer + (get-buffer mime::article/preview-buffer))) + (pwin (and pbuf (vm-get-visible-buffer-window pbuf)))) + (if pwin + (if running-xemacs + (let ((tmp (generate-new-buffer "tm-vm/tmp"))) + (set-buffer pbuf) + (append-to-buffer tmp (point-min) (point-max)) + (set-buffer tmp) + (map-extents + '(lambda (ext maparg) + (set-extent-property ext 'begin-glyph nil))) + (append-to-buffer b (point-min) (point-max)) + (setq end (vm-marker (+ start (length (buffer-string))) b)) + (kill-buffer tmp)) + (set-buffer pbuf) + (append-to-buffer b (point-min) (point-max)) + (setq end (vm-marker (+ start (length (buffer-string))) b))) + (save-restriction + (widen) + (append-to-buffer + b (vm-headers-of message) (vm-text-end-of message)) + (setq end + (vm-marker (+ start (- (vm-text-end-of message) + (vm-headers-of message))) b)))))) + (push-mark end) + (cond (mail-citation-hook (run-hooks 'mail-citation-hook)) + (mail-yank-hooks (run-hooks 'mail-yank-hooks)) + (t (vm-mail-yank-default message)))))) + ;;; @ for tm-view ;;; -- 1.7.10.4