From: morioka Date: Mon, 9 Mar 1998 12:06:51 +0000 (+0000) Subject: tm 7.31. X-Git-Tag: tm7_31~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e7cf063423325b2417e142f468f0c960f17a0c8e;p=elisp%2Ftm.git tm 7.31. --- diff --git a/Changes-7.31.en b/Changes-7.31.en new file mode 100644 index 0000000..dd25e93 --- /dev/null +++ b/Changes-7.31.en @@ -0,0 +1,74 @@ +Thu Dec 7 12:07:47 1995 Morioka Tomohiko + + * tl: Version 7.03.1 was released. + * tm: Version 7.31 was released. + * tm/gnus: Version 7.21.1 was released. + + * Makefile: tl/README.eng was renamed to tl/README.en. + +Thu Dec 7 10:23:55 1995 Morioka Tomohiko + + * tm-vm.el: vm-mail-mode pop up menu setting for XEmacs. + + * tm-mail.el: pop up menu setting for XEmacs. + + * tm-edit.el: + MUA depended codes about XEmacs pop up menu were moved to + tm-MUAs. + + * tm-view.el: defvar `mime::article/preview-buffer' and + `mime::article/code-converter' for XEmacs. + + * tm-edit.el: some comments are modified. + +Thu Dec 7 09:10:28 1995 Morioka Tomohiko + + * Makefile: + (1) drives `make gnus5' and `make sgnus' for xemacs and 19_29. + (2) README.eng was rename to README.en. + +Thu Dec 7 08:01:31 1995 Morioka Tomohiko + + * tm-play.el: + Function `mime-article/view-message/rfc822' was modified to set + buffer local variable `mime::article/code-converter'. + + * tm-view.el: + New buffer local variable `mime::article/code-converter': It + specifies code-converter. If it is nil, + `mime-viewer/code-converter-alist' is used. + +Thu Dec 7 06:18:21 1995 Morioka Tomohiko + + * tm-view.el: + pop up menu support by mouse-button-3 for Emacs 19 and XEmacs. + +Thu Dec 7 06:10:32 1995 Steven L. Baur + + * tm-edit.el: pop up menu for XEmacs. (cf. [tm-en:209]) + +Thu Dec 7 04:55:49 1995 Morioka Tomohiko + + * tm-rmail.el: version variables were added. + + * tm-rmail.el: + Shuhei KOBAYASHI 's patch was applied + to fix problem of function `tm-rmail/forward' in *mail* buffer. (and + some extensions) (cf. [tm-ja:1225]) + +Thu Dec 6 23:16:14 1995 Steven L. Baur + + * tm-view.el: mouse-button-3 menu for XEmacs. (cf. [tm-en:206]) + +Thu Dec 6 15:53:54 1995 Shuhei KOBAYASHI + + * README.eng: fixed typo about VM (cf. [tm-ja:1224]) + + * tm-file.el: fix and extend. (cf. [tm-ja:1224]) + +Wed Dec 6 15:35:52 1995 Morioka Tomohiko + + * tm-rmail.el: + `(substitute-key-definition + 'rmail-forward 'tm-rmail/forward rmail-mode-map)' + should be enclosed by (call-after-loaded 'mime-setup ..). diff --git a/Makefile b/Makefile index c86404b..d23fcef 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 7.6 1995/12/04 00:44:28 morioka Exp morioka $ +# $Id: Makefile,v 7.8 1995/12/07 12:07:47 morioka Exp $ # include config.tm @@ -7,7 +7,7 @@ include config.tm UTILS = src/ol2 src/decode-b GOMI = $(UTILS) *.elc loadpath -TM_FILES = tm/README.eng tm/Changes* \ +TM_FILES = tm/README.en tm/Changes* \ tm/config.tm tm/Makefile tm/mk-tm \ 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 \ @@ -31,12 +31,12 @@ TM_MUA_FILES = tm/tm-rmail.el tm/tm-vm.el tm/tm-mail.el \ MEL_FILES = mel/*.el mel/Makefile mel/mk-mel mel/Changes* -TL_FILES = tl/README.eng tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \ +TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \ tl/Changes* FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.30.tar.gz +TARFILE = tm7.31.tar.gz 18: @@ -65,10 +65,8 @@ xemacs: cd ../mel; PWD=`pwd` make elc EMACS=$(XEMACS) $(XEMACS) -batch -l mk-tm -f compile-tm cd gnus; PWD=`pwd` make gnus EMACS=$(XEMACS) -# If you use Gnus 5.*, please use following comment: -# cd gnus; PWD=`pwd` make gnus5 EMACS=$(XEMACS) -# If you use September Gnus, please use following comment: -# cd gnus; PWD=`pwd` make sgnus EMACS=$(XEMACS) + cd gnus; PWD=`pwd` make gnus5 EMACS=$(XEMACS) + cd gnus; PWD=`pwd` make sgnus EMACS=$(XEMACS) cd mh-e; PWD=`pwd` make elc EMACS=$(XEMACS) install-xemacs: xemacs @@ -88,8 +86,8 @@ install-xemacs: xemacs cd ../mel; PWD=`pwd` make elc EMACS=$(EMACS19_29) $(EMACS19_29) -batch -l mk-tm -f compile-tm cd gnus; PWD=`pwd` make gnus EMACS=$(EMACS19_29) -# If you use September Gnus, please use following comment: -# cd gnus; PWD=`pwd` make sgnus EMACS=$(EMACS19_29) + cd gnus; PWD=`pwd` make gnus5 EMACS=$(EMACS19_29) + cd gnus; PWD=`pwd` make sgnus EMACS=$(EMACS19_29) cd mh-e; PWD=`pwd` make elc EMACS=$(EMACS19_29) install-19_29: 19_29 diff --git a/README.en b/README.en new file mode 100644 index 0000000..9716008 --- /dev/null +++ b/README.en @@ -0,0 +1,328 @@ +[README for tm (English Version)] +by MORIOKA Tomohiko +and KOBAYASHI Shuhei +$Id: README.en,v 7.5 1995/12/07 11:24:57 morioka Exp $ + +1 What's tm? + + tm is a MIME package for GNU Emacs. tm has following functions: + + - MIME style multilingual header + - MIME message viewer (mime/viewer-mode) + - MIME message composer (mime/editor-mode) + - MIME extenders for mh-e, GNUS, RMAIL and VM + + +2 Documents + + This package includes following documents. + +(1) English edition + +- tm/doc/tm_en.texi : tm Reference Manual (TeXinfo) +- tm/doc/tm-view_en.texi: tm-view Reference Manual (TeXinfo) +- tm/doc/tm-gnus_en.texi: tm-gnus Reference Manual (TeXinfo) + +(2) Japanese edition + +- tm/doc/tm_ja.tex : tm Reference Manual (TeXinfo) +- tm/doc/tm-view_ja.texi : tm-view Reference Manual (TeXinfo) +- tm/doc/tm-gnus_ja.texi : tm-gnus Reference Manual (TeXinfo) +- tm/doc/signature-jp.ol : signature.el Reference Manual (Emacs Outline) +- tm/doc/signature-jp.tex: signature.el Reference Manual (LaTeX) + + +3 Modules + + tm has following modules: + + - tm-view : MIME viewer + - tm-parse.el : MIME message parser + - tm-play.el : MIME content player + - tm-ew-d.el : MIME encoded-word decoder + - preview filter for tm-view + - tm-rich : for text/enriched and text/richtext + - internal methods for tm-view + - tm-partial : automatic assembler for message/partial + - tm-ftp : for anonymous ftp + - tm-file : for file extraction + - tm-tar : for tar content + - tm-latex : for LaTeX + - tm-html : for text/html + - tm-edit : MIME composer (mime.el and tm-comp.el were merged) + - tm-ew-e.el : MIME encoded-word encoder + - tm-def : definition module for tm + - tm-nemacs.el : NEmacs depended part of tm + - tm-orig.el : FSF original Emacs and XEmacs + depended part of tm + - tm-mule.el : Mule depended part of tm + - tm-MUAs : MIME extender for MUAs + - tm-mh-e : tm-MUA for mh-e + - tm-gnus : tm-MUA for GNUS + - tm-rmail : tm-MUA for RMAIL + - tm-vm : tm-MUA for vm + - tm-mail : tm-MUA library module for mail-mode + - mime-setup: set up module for MIME + - tm-setup: set up only reading + + +4 Install + +4.1 tm/config.tm + + Please edit tm/config.tm file. + + +4.2 External methods + + Please edit external methods in `tm/methods/' directory for your +environment. + + tm/methods/tm-au for audio + tm/methods/tm-file for file extraction + tm/methods/tm-image for image + tm/methods/tm-mpeg for MPEG + tm/methods/tm-plain for plain text + tm/methods/tm-html for HTML + tm/methods/tmdecode decoder + + +4.3 make + + Run `make all'. + + +4.4 install + + Run `make install'. + + +4.5 Emacs Lisp modules + + Run `make install-18', if you use Emacs 18 (NEmacs, Mule 1.*). + + Run `make install-xemacs', if you use Emacs .. 19.28 (Mule 2.* based +on), or XEmacs. + + Run `make install-19_29', if you use Emacs 19.29 or later (Mule 2.* +based on). + + Or copy *.el to your emacs lisp directory. + + +5 tm-MUA + +5.1 tm-gnus + + If you use optional GNUS or Gnus, you must edit and make manually. + +(1) Please edit tm/gnus/Makefile. + + If you use Emacs 18.* and GNUS 3.*, please edit tm/gnus/g3-path. + + If you use Emacs 18.* and GNUS 4.*, please edit tm/gnus/g4-path. + + If you use Gnus 5.0.*, please edit tm/gnus/g5-path. + + If you use September Gnus, please edit tm/gnus/s-path. + +(2) make + + Run `make gnus3', if you use GNUS 3.*. + + Run `make gnus4', if you use GNUS 4.*. + + Run `make gnus5', if you use Gnus 5.0.*. + + Run `make sgnus', if you use September Gnus. + +(3) install + + Run `make install-18', if you use Emacs 18.*. + + Run `make install-19', if you use Emacs .. 19.28 or XEmacs. + + Run `make install-19_29', if you use Emacs 19.29 or later. + + +5.1.1 automatic MIME preview support + + tm-gnus provides automatic MIME preview feature for GNUS 3.15 or +later, Gnus 5.0.*, Gnus 5.1, and September Gnus. + + If you don't want to use automatic MIME preview feature, please +insert following to ~/.emacs. + + (setq tm-gnus/automatic-mime-preview nil) + + In addition, September Gnus has automatic MIME preview supporting +feature. Of course, tm-gnus provide this feature for other GNUS and +Gnus, but it is unnatural. + + When automatic MIME preview mode, GNUS and Gnus do MIME processing +if a message has a Mime-Version field. If it does not have, GNUS and +Gnus does not do MIME processing, in default. + + Gnus 5.0.*, 5.1 and September Gnus have a variable +`gnus-strict-mime'. If you insert + + (setq gnus-strict-mime nil) + +Gnus do MIME processing even if a message does not have Mime-Version +field. + + In September Gnus, if `gnus-strict-mime' is not nil, variable +`gnus-decode-encoded-word-method' is called. tm-gnus uses it to decode +RFC 1522 encoded-word. So it is not necessary to reset +`gnus-strict-mime'. + + +5.2 tm-mh-e + + If you use optional mh-e, you must edit and make manually. + +(1) Please edit mh-e/Makefile + +(2) make + + Run `make elc'. + +(3) install + + Run `make install-18', if you use Emacs 18.*. + + Run `make install-19', if you use Emacs 19.*. + +5.3 VM + + If you use VM, please edit `mk-tm'. + + +6 .emacs + + Please insert (load "mime-setup") in ~/.emacs. + +6.1 VM + + If you use vm, please insert (require 'tm-vm) in ~/.vm. + + tm works well with BBDB: If you use VM, please insert +(require 'tm-vm) *after* (bbdb-insinuate-vm). + + +6.2 setting sample for hilit19 + +====================================================================== +(cond (window-system + (let* ((header-patterns '(("^Subject:.*$" nil msg-subject) + ("^From:.*$" nil msg-from) + ("^--text follows this line--$" + nil msg-separator) + ("^[A-Za-z][A-Za-z0-9-]+:" nil msg-header) + )) + (body-patterns '(("^\\(In article\\|[ \t]*\\w*[]<>}|]\\).*$" + nil msg-quote))) + (message-patterns (append header-patterns body-patterns)) + ) + (hilit-set-mode-patterns 'msg-header header-patterns) + (hilit-set-mode-patterns 'msg-body body-patterns) + (hilit-set-mode-patterns 'mime/viewer-mode + message-patterns + 'hilit-rehighlight-message) + ) + (add-hook 'mime-viewer/content-header-filter-hook + (function hilit-rehighlight-buffer-quietly)) + (add-hook 'mime-viewer/plain-text-preview-hook + (function hilit-rehighlight-buffer-quietly)) + )) +====================================================================== + +6.3 setting sample for browse + + If you have browse-url.el (included in Gnus 5.*, September Gnus and +Emacs 19.30 or later), you can use URL button in +mime/viewer-mode. Following is setting sample: + +====================================================================== +(setq browse-url-browser-function + (if (eq window-system 'x) + 'browse-url-netscape + 'browse-url-w3)) +(autoload browse-url-browser-function "browse-url" + "Ask a WWW browser to show a URL." t) +====================================================================== + + +7 How to use mime/viewer-mode + +In tm-MUAs, you can use mime/viewer-mode if you press `v' key (in VM, +`Z' key) in Summary mode. Or automatic MIME previewed buffer's +major-mode is mime/viewer-mode. mime/viewer-mode has following +functions: + + q quit from mime/viewer-mode + u move to upper content + p move to previous content + n move to next content + SPC scroll up or move to next content + M-SPC scroll down or move to previous content + DEL scroll down or move to previous content + RET move to next line + M-RET move to previous line + v play current content + e extract as file current content + C-c C-p print current content + button-2 move to point under the mouse cursor and play + current content or browse URL + + +8 Bug report + +If you write bug-reports and/or propositions for improvement, please +post them to following news groups: + + fj.editor.emacs (Japanese or English) + fj.editor.mule (Japanese or English; if you use Mule) + gnu.emacs.help (English) + + fj.news.reader.gnus (Japanese or English; about GNUS and Gnus) + gnu.emacs.gnus (English; about GNUS and Gnus) + + gnu.emacs.vm.info (English; about tm-vm) + +or send to tm ML: + + bug-tm-en@chamonix.jaist.ac.jp (English) + bug-tm-ja@chamonix.jaist.ac.jp (Japanese) + +Via tm ML, You can report bugs of tm, obtain the latest release of tm +package, and discuss the future enhancements to tm. To join tm ML, +send a mail to + + tm-admin@chamonix.jaist.ac.jp (Japanese or English) + tm-eng-admin@chamonix.jaist.ac.jp (English) + +Since the user registration is manually done, please write the mail +body in human-recognizable language (^_^). + + +9 How to get new version + +tm is available from following anonymous ftp site: + + ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/ (Japan) + +and its mirrors: + + ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/ (Japan) + ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/ (US) + + +10 TODO + +- automatic MIME preview support for another MUA +- better XEmacs support (e.g. inline image) +- development of internal method for message/external-body based on + tm-ftp +- development good MIME composer +- etc. diff --git a/gnus/ChangeLog-7.21.1.en b/gnus/ChangeLog-7.21.1.en new file mode 100644 index 0000000..f5b5fff --- /dev/null +++ b/gnus/ChangeLog-7.21.1.en @@ -0,0 +1,12 @@ +Thu Dec 7 10:21:22 1995 Morioka Tomohiko + + * tm/gnus: Version 7.21.1 was released. + + * tm-gnus.el: news-reply-mode pop up menu setting for XEmacs. + +Thu Dec 7 08:44:12 1995 Morioka Tomohiko + + * tm-gnus4.el: + Function `tm-gnus/article-reset-variable' was modified to reset + `gnus-original-article-buffer' to nil instead of + `gnus-article-buffer'. diff --git a/gnus/Makefile b/gnus/Makefile index b0652e7..f82b8d0 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -27,7 +27,7 @@ TMDIR19_29 = $(DATADIR19_29)/$(EMACS_PREFIX)/site-lisp FILES = tm/gnus/*.el tm/doc/tm-gnus*.texi -TARFILE = tm-gnus7.21.tar +TARFILE = tm-gnus7.21.1.tar gnus: diff --git a/gnus/mk-tgnus b/gnus/mk-tgnus index a5dad38..a146325 100644 --- a/gnus/mk-tgnus +++ b/gnus/mk-tgnus @@ -23,6 +23,7 @@ (cond ((boundp 'gnus-original-article-buffer) (require 'tm-gnus) (byte-compile-file "tm-sgnus.el") + (byte-compile-file "tm-gd5.el") ) ((string-match "Gnus v5\\|September Gnus" gnus-version) (require 'tm-gnus) diff --git a/gnus/tm-gnus.el b/gnus/tm-gnus.el index 501203d..6955405 100644 --- a/gnus/tm-gnus.el +++ b/gnus/tm-gnus.el @@ -9,7 +9,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1993/11/20 (obsolete mol's gnus-mime.el) ;;; Version: -;;; $Id: tm-gnus.el,v 7.11 1995/12/04 23:55:05 morioka Exp $ +;;; $Id: tm-gnus.el,v 7.12 1995/12/07 10:21:22 morioka Exp $ ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual ;;; ;;; This file is part of tm (Tools for MIME). @@ -95,6 +95,19 @@ (news-reply-yank-original 0) )) +;;; modified by Steven L. Baur +;;; 1995/12/6 (c.f. [tm-en:209]) +(defun mime-editor/attach-to-news-reply-menu () + "Arrange to attach MIME editor's popup menu to VM's" + (if (boundp 'news-reply-menu) + (progn + (setq news-reply-menu (append news-reply-menu + '("---") + mime-editor/popup-menu-for-xemacs)) + (remove-hook 'news-setup-hook + 'mime-editor/attach-to-news-reply-menu) + ))) + (call-after-loaded 'tm-edit (function @@ -106,6 +119,7 @@ (autoload 'tm-mail/insert-message "tm-mail") (set-alist 'mime-editor/message-inserter-alist 'mail-mode (function tm-mail/insert-message)) + (add-hook 'news-setup-hook 'mime-editor/attach-to-news-reply-menu) ))) diff --git a/gnus/tm-gnus4.el b/gnus/tm-gnus4.el index c2c316a..8b26e45 100644 --- a/gnus/tm-gnus4.el +++ b/gnus/tm-gnus4.el @@ -8,7 +8,7 @@ ;;; modified by OKABE Yasuo ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1993/11/20 (merged tm-gnus5.el) -;;; Version: $Revision: 7.11 $ +;;; Version: $Revision: 7.12 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -35,7 +35,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus4.el,v 7.11 1995/12/05 07:36:32 morioka Exp $") + "$Id: tm-gnus4.el,v 7.12 1995/12/07 08:44:12 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for 3.15 .. 5.1")) @@ -147,7 +147,7 @@ This variable is set to `gnus-show-mime'.") "\e\r" (function tm-gnus/summary-scroll-down)) (defun tm-gnus/article-reset-variable () - (setq gnus-original-article-buffer gnus-article-buffer) + (setq gnus-original-article-buffer nil) (setq tm-gnus/automatic-mime-preview nil) (gnus-article-mode) (setq buffer-read-only nil) diff --git a/mk-tm b/mk-tm index 8a696e8..4af51ad 100644 --- a/mk-tm +++ b/mk-tm @@ -89,7 +89,7 @@ tm-modules)) (defun compile-tm () - (require 'gnus) + ;; (require 'gnus) (require 'tm-rich) (require 'mel-u) (require 'tm-edit) diff --git a/tm-edit.el b/tm-edit.el index 1b3fe4c..01c0c78 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -7,7 +7,7 @@ ;; Author: UMEDA Masanobu ;; MORIOKA Tomohiko -;; Version: $Revision: 7.30 $ +;; Version: $Revision: 7.31 $ ;; Keywords: mail, news, MIME, multimedia, multilingual ;; This file is not part of GNU Emacs. @@ -108,7 +108,7 @@ ;; LCD Archive Entry: ;; mime|Masanobu UMEDA|umerin@mse.kyutech.ac.jp| ;; Simple MIME Composer| -;; $Date: 1995/12/06 12:52:53 $|$Revision: 7.30 $|~/misc/mime.el.Z| +;; $Date: 1995/12/07 10:18:56 $|$Revision: 7.31 $|~/misc/mime.el.Z| ;;; Code: @@ -126,7 +126,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.30 1995/12/06 12:52:53 morioka Exp $") + "$Id: tm-edit.el,v 7.31 1995/12/07 10:18:56 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -480,7 +480,7 @@ Tspecials means any character that matches with it in header must be quoted.") (defconst mime-editor/menu-title "MIME-Edit") (defconst mime-editor/menu-list - '((mime-help "Describe MIME Mode" mime-editor/help) + '((mime-help "Describe MIME editor mode" mime-editor/help) (file "Insert File" mime-editor/insert-file) (external "Insert External" mime-editor/insert-external) (voice "Insert Voice" mime-editor/insert-voice) @@ -514,7 +514,7 @@ Tspecials means any character that matches with it in header must be quoted.") )) ;;; modified by Pekka Marjola -;;; 1995/9/5 (c.f. [tm-eng:69]) +;;; 1995/9/5 (c.f. [tm-en:69]) (defun mime-editor/define-menu-for-xemacs () "Define menu for Emacs 19." (cond ((featurep 'menubar) @@ -529,6 +529,19 @@ Tspecials means any character that matches with it in header must be quoted.") )) mime-editor/menu-list))) ))) + +;;; modified by Steven L. Baur +;;; 1995/12/6 (c.f. [tm-en:209]) +(if (and (string-match "XEmacs\\|Lucid" emacs-version) + (not (boundp 'mime-editor/popup-menu-for-xemacs))) + (setq mime-editor/popup-menu-for-xemacs + (append '("MIME Commands" "---") + (mapcar (function (lambda (item) + (vector (nth 1 item) + (nth 2 item) + t))) + mime-editor/menu-list))) + ) ;;; end diff --git a/tm-file.el b/tm-file.el index 6eae652..c1e0dce 100644 --- a/tm-file.el +++ b/tm-file.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-file.el,v 2.0 1995/11/06 16:05:29 morioka Exp $ +;;; $Id: tm-file.el,v 3.0 1995/12/07 11:22:08 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -16,18 +16,24 @@ (defun mime-article/extract-file (beg end cal) (let* ((name (or (cdr (assoc "name" cal)) - (cdr (assoc "x-name" cal)) - (make-temp-name "tm"))) + (cdr (assoc "x-name" cal)))) (encoding (cdr (assq 'encoding cal))) - (dir (call-interactively - (function - (lambda (dir) - (interactive "Ddirictory: ") - dir)))) (file-coding-system *noconv*) - (filename (expand-file-name name dir)) + (filename + (if name + (expand-file-name name + (call-interactively + (function + (lambda (dir) + (interactive "DDirectory: ") + dir)))) + (call-interactively + (function + (lambda (file) + (interactive "FFilename: ") + (expand-file-name file)))))) (the-buf (current-buffer)) - (tmp-buf (generate-new-buffer name)) + (tmp-buf (generate-new-buffer (file-name-nondirectory filename))) ) (goto-char beg) (re-search-forward "\n\n") diff --git a/tm-mail.el b/tm-mail.el index ee2277c..f7b1c1d 100644 --- a/tm-mail.el +++ b/tm-mail.el @@ -7,7 +7,7 @@ ;;; modified by MORIOKA Tomohiko ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/11/27 -;;; Version: $Id: tm-mail.el,v 1.1 1995/12/03 13:40:45 morioka Exp $ +;;; Version: $Id: tm-mail.el,v 1.2 1995/12/07 10:22:31 morioka Exp $ ;;; Keywords: mail, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -25,6 +25,10 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with This program. If not, write to the Free Software ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;;; +;;; Code: + +(require 'tm-edit) (defun tm-mail/insert-message (&optional message) (interactive) @@ -56,6 +60,13 @@ )) )) +(if (string-match "XEmacs\\|Lucid" emacs-version) + (setq mail-mode-menu + (append mail-mode-menu + '("---") + mime-editor/popup-menu-for-xemacs)) + ) + ;;; @ end ;;; diff --git a/tm-play.el b/tm-play.el index 51fcbcb..49016a2 100644 --- a/tm-play.el +++ b/tm-play.el @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/9/26 (separated from tm-view.el) ;;; Version: -;;; $Id: tm-play.el,v 7.4 1995/12/06 12:45:52 morioka Exp $ +;;; $Id: tm-play.el,v 7.5 1995/12/07 08:01:31 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -211,6 +211,9 @@ (cur-buf (current-buffer)) (new-name (format "%s-%s" (buffer-name) cnum)) (mother mime::article/preview-buffer) + (code-converter + (or (cdr (assq major-mode mime-viewer/code-converter-alist)) + 'mime-viewer/default-code-convert-region)) str) (setq str (buffer-substring beg end)) (switch-to-buffer new-name) @@ -221,6 +224,7 @@ (delete-region (point-min) (match-end 0)) ) (setq major-mode 'mime/show-message-mode) + (setq mime::article/code-converter code-converter) (mime/viewer-mode mother) )) diff --git a/tm-rmail.el b/tm-rmail.el index 13afb96..87e6c68 100644 --- a/tm-rmail.el +++ b/tm-rmail.el @@ -2,13 +2,30 @@ ;;; Copyright (C) 1995 Free Software Foundation, Inc. ;;; Copyright (C) 1994,1995 MORIOKA Tomohiko ;;; -;;; Author: MORIOKA Tomohiko +;;; Author: MORIOKA Tomohiko +;;; modified by KOBAYASHI Shuhei +;;; Created: 1994/8/30 ;;; Version: -;;; $Id: tm-rmail.el,v 7.16 1995/12/03 13:46:59 morioka Exp $ +;;; $Revision: 7.19 $ ;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). ;;; +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation; either version 2, or +;;; (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with This program. If not, write to the Free Software +;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;;; +;;; Code: (require 'tl-list) (require 'tl-misc) @@ -22,6 +39,10 @@ ;;; @ variables ;;; +(defconst tm-rmail/RCS-ID + "$Id: tm-rmail.el,v 7.19 1995/12/07 04:55:49 morioka Exp $") +(defconst tm-rmail/version (get-version-string tm-rmail/RCS-ID)) + (defvar tm-rmail/decode-all nil) @@ -179,21 +200,16 @@ ;;; @ for tm-edit ;;; -(call-after-loaded - 'tm-edit - (function - (lambda () - (defun tm-rmail/forward () - "\ -Forward current message in message/rfc822 content-type message + "Forward current message in message/rfc822 content-type message from rmail. The message will be appended if being composed." (interactive) ;;>> this gets set even if we abort. Can't do anything about it, though. (rmail-set-attribute "forwarded" t) (let ((initialized nil) (beginning nil) - (forwarding-buffer (current-buffer)) + (msgnum rmail-current-message) + (rmail-buffer (current-buffer)) (subject (concat "[" (mail-strip-quoted-names (mail-fetch-field "From")) @@ -207,22 +223,26 @@ from rmail. The message will be appended if being composed." (mail nil nil subject) (mail-other-window nil nil subject))) (save-excursion + ;; following two variables are used in 19.29 or later. + (make-local-variable 'rmail-send-actions-rmail-buffer) + (make-local-variable 'rmail-send-actions-rmail-msg-number) + (make-local-variable 'mail-reply-buffer) + (setq rmail-send-actions-rmail-buffer rmail-buffer) + (setq rmail-send-actions-rmail-msg-number msgnum) + (setq mail-reply-buffer rmail-buffer) (goto-char (point-max)) (forward-line 1) (setq beginning (point)) (mime-editor/insert-tag "message" "rfc822") - (insert-buffer forwarding-buffer)) +;; (insert-buffer rmail-buffer)) +;; (mime-editor/inserted-message-filter)) + (tm-mail/insert-message)) (if (not initialized) (goto-char beginning)) )) -(substitute-key-definition 'rmail-forward - 'tm-rmail/forward - rmail-mode-map) - (defun gnus-mail-forward-using-mail-mime () - "\ -Forward current article in message/rfc822 content-type message from + "Forward current article in message/rfc822 content-type message from GNUS. The message will be appended if being composed." (let ((initialized nil) (beginning nil) @@ -251,19 +271,25 @@ GNUS. The message will be appended if being composed." (goto-char beginning)) )) -;; (setq gnus-mail-forward-method 'mime-forward-from-gnus-using-mail) - (call-after-loaded - 'tm-edit + 'mime-setup (function (lambda () - (autoload 'tm-mail/insert-message "tm-mail") - (set-alist 'mime-editor/message-inserter-alist - 'mail-mode (function tm-mail/insert-message)) + (substitute-key-definition + 'rmail-forward 'tm-rmail/forward rmail-mode-map) + + ;; (setq gnus-mail-forward-method 'gnus-mail-forward-using-mail-mime) + + (call-after-loaded + 'tm-edit + (function + (lambda () + (autoload 'tm-mail/insert-message "tm-mail") + (set-alist 'mime-editor/message-inserter-alist + 'mail-mode (function tm-mail/insert-message)) + ))) ))) -))) - ;;; @ end ;;; diff --git a/tm-view.el b/tm-view.el index 4166989..315fee4 100644 --- a/tm-view.el +++ b/tm-view.el @@ -5,9 +5,10 @@ ;;; Copyright (C) 1994,1995 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko +;;; modified by Steven L. Baur ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;;; Version: $Revision: 7.30 $ +;;; Version: $Revision: 7.31.1.1 $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -41,7 +42,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.30 1995/12/06 07:38:01 morioka Exp $") + "$Id: tm-view.el,v 7.31.1.1 1995/12/07 10:17:14 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -270,15 +271,19 @@ Each elements are regexp of field-name. [tm-view.el]") ;;; @@ buffer local variables ;;; -(defvar mime::preview/original-window-configuration nil) -(defvar mime::preview/mother-buffer nil) - -(defvar mime::article/content-info nil) +;; for XEmacs (defvar mime::article/preview-buffer nil) +(defvar mime::article/code-converter nil) + +(make-variable-buffer-local 'mime::article/content-info) +(make-variable-buffer-local 'mime::article/preview-buffer) +(make-variable-buffer-local 'mime::article/code-converter) -(defvar mime::preview/article-buffer nil) -(defvar mime::preview/content-list nil) -(defvar mime::preview/original-major-mode nil) +(make-variable-buffer-local 'mime::preview/mother-buffer) +(make-variable-buffer-local 'mime::preview/content-list) +(make-variable-buffer-local 'mime::preview/article-buffer) +(make-variable-buffer-local 'mime::preview/original-major-mode) +(make-variable-buffer-local 'mime::preview/original-window-configuration) ;;; @@ quitting method @@ -339,10 +344,8 @@ The compressed face will be piped to this command.") (get-buffer ibuf) (set-buffer ibuf) )) - (make-variable-buffer-local 'mime::article/content-info) (setq mime::article/content-info (mime/parse-message ctl encoding)) (let ((ret (mime-viewer/make-preview-buffer obuf))) - (make-variable-buffer-local 'mime::article/preview-buffer) (setq mime::article/preview-buffer (car ret)) ret)) @@ -365,9 +368,7 @@ The compressed face will be piped to this command.") (setq bf (get-buffer-create obuf)) (set-buffer obuf) )) - (make-variable-buffer-local 'mime::preview/article-buffer) (setq mime::preview/article-buffer the-buf) - (make-variable-buffer-local 'mime::preview/original-major-mode) (setq mime::preview/original-major-mode mode) (setq major-mode 'mime/viewer-mode) (setq mode-name "MIME-View") @@ -622,9 +623,13 @@ The compressed face will be piped to this command.") (defun mime-preview/decode-text-region (beg end charset encoding) (mime/decode-region encoding beg end) (let* ((mode mime::preview/original-major-mode) - (m (assq mode mime-viewer/code-converter-alist)) + (m (or (save-excursion + (set-buffer mime::preview/article-buffer) + mime::article/code-converter) + (cdr (assq mode mime-viewer/code-converter-alist)) + )) ) - (if (and m (fboundp (setq m (cdr m)))) + (if (and m (fboundp m)) (funcall m beg (point-max) charset encoding) (mime-viewer/default-code-convert-region beg (point-max) charset encoding) @@ -695,8 +700,57 @@ The compressed face will be piped to this command.") (define-key mime/viewer-mode-map mouse-button-2 (function tm:button-dispatcher)) ) + (if mouse-button-3 + (define-key mime/viewer-mode-map + mouse-button-3 (function mime-viewer/popup-menu)) + ) )) +(defvar mime-viewer/popup-menu-title "MIME Viewer Commands") +(defvar mime-viewer/popup-menu-items + '(("Move to upper content" . mime-viewer/up-content) + ("Move to previous content" . mime-viewer/previous-content) + ("Move to next content" . mime-viewer/next-content) + ("Scroll to previous content" . mime-viewer/scroll-down-content) + ("Scroll to next content" . mime-viewer/scroll-up-content) + ("Play Content" . mime-viewer/play-content) + ("Extract Content" . mime-viewer/extract-content) + ("Print" . mime-viewer/print-content) + ("Show X Face" . mime-viewer/display-x-face) + ) + "Popup Menu for MIME Viewer") + +(cond ((string-match "XEmacs\\|Lucid" emacs-version) + (defvar mime-viewer/popup-menu + (cons mime-viewer/popup-menu-title + (mapcar (function + (lambda (item) + (vector (car item)(cdr item) t) + )) + mime-viewer/popup-menu-items))) + (defun mime-viewer/popup-menu (event) + "Popup the menu in the MIME Viewer buffer" + (interactive "e") + (select-window (event-window event)) + (set-buffer (event-buffer event)) + (popup-menu 'mime-viewer/popup-menu)) + ) + ((>= emacs-major-version 19) + (defun mime-viewer/popup-menu (event) + (interactive "e") + (mouse-set-point event) + (let ((menu + (cons mime-viewer/popup-menu-title + (list (cons "Menu Items" mime-viewer/popup-menu-items)) + ))) + (let ((func (x-popup-menu event menu))) + (if func + (funcall func) + )) + )) + )) + + (defun mime/viewer-mode (&optional mother ctl encoding ibuf obuf) "Major mode for viewing MIME message. @@ -739,15 +793,12 @@ listed in key order: ) (prog1 (switch-to-buffer (car ret)) - (make-variable-buffer-local 'mime::preview/original-window-configuration) (setq mime::preview/original-window-configuration win-conf) (if mother (progn - (make-variable-buffer-local 'mime::preview/mother-buffer) (setq mime::preview/mother-buffer mother) )) (use-local-map mime/viewer-mode-map) - (make-variable-buffer-local 'mime::preview/content-list) (setq mime::preview/content-list (nth 1 ret)) (goto-char (let ((ce (mime::preview-content-info/point-max diff --git a/tm-vm.el b/tm-vm.el index 66b8fbe..8bc072d 100644 --- a/tm-vm.el +++ b/tm-vm.el @@ -11,7 +11,7 @@ ;;; modified by SHIONO Jun'ichi ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/10/29 -;;; Version: $Revision: 7.29 $ +;;; Version: $Revision: 7.30 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -36,7 +36,7 @@ (require 'vm) (defconst tm-vm/RCS-ID - "$Id: tm-vm.el,v 7.29 1995/12/06 08:49:15 morioka Exp $") + "$Id: tm-vm.el,v 7.30 1995/12/07 10:23:55 morioka Exp $") (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) (define-key vm-mode-map "Z" 'tm-vm/view-message) @@ -635,6 +635,19 @@ only marked messages will be put into the digest." (substitute-key-definition 'vm-send-digest 'tm-vm/send-digest vm-mode-map) +;;; modified by Steven L. Baur +;;; 1995/12/6 (c.f. [tm-en:209]) +(defun mime-editor/attach-to-vm-mode-menu () + "Arrange to attach MIME editor's popup menu to VM's" + (if (boundp 'vm-menu-mail-menu) + (progn + (setq vm-menu-mail-menu + (nconc vm-menu-mail-menu + (list "----") + mime-editor/popup-menu-for-xemacs)) + (remove-hook 'vm-mail-mode-hook 'mime-editor/attach-to-vm-mode-menu) + ))) + (call-after-loaded 'tm-edit (function @@ -642,6 +655,7 @@ only marked messages will be put into the digest." (autoload 'tm-mail/insert-message "tm-mail") (set-alist 'mime-editor/message-inserter-alist 'mail-mode (function tm-mail/insert-message)) + (add-hook 'vm-mail-mode-hook 'mime-editor/attach-to-vm-mode-menu) ))) (call-after-loaded