#
-# $Id: Makefile,v 6.2 1995/04/28 06:15:37 morioka Exp morioka $
+# $Id: Makefile,v 6.3 1995/05/01 19:17:16 morioka Exp morioka $
#
# Please specify emacs executables:
# TMDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1)
# TMDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2)
-# TMDIR18 = /usr/local/lib/emacs/local.lisp/tm
+ TMDIR18 = /usr/local/lib/emacs/local.lisp/tm
# TMDIR19 = /usr/local/lib/mule/site-lisp
- TMDIR18 = $(HOME)/lib/emacs18/lisp
+# TMDIR18 = $(HOME)/lib/emacs18/lisp
TMDIR19 = $(HOME)/lib/emacs19/lisp
# Please specify GNUS type (`gnus3' or `gnus4') if you use Emacs 18.*
EMACS18_GNUS = gnus3
# EMACS18_GNUS = gnus4
+# Please specify optional load-path
+ NEMACS_OPT = /usr/local/lib/nemacs/local.lisp
+ MULE1_OPT = /usr/local/lib/mule/local.lisp
+ ORIG19_OPT =
+ MULE2_OPT =
+
bindir = $(HOME)/bin
CC = gcc
CFLAGS = -O
tm/mh-e/Makefile tm/mh-e/Makefile.bc tm/mh-e/*.el \
tl/README.eng tl/Makefile tl/Makefile.bc tl/*.el tl/doc/*.texi
-TARFILE = tm6.19.0.tar
+TARFILE = tm6.19.1.tar
+
-.lpath.el:
- ./make-lpath
+lpath-nemacs:
+ ./make-lpath $(NEMACS_OPT)
-nemacs: .lpath.el
+nemacs: lpath-nemacs
make -f Makefile.bc all EMACS=$(NEMACS) EMACS_TYPE=nemacs
(cd gnus; make nemacs NEMACS=$(NEMACS) EMACS18_GNUS=$(EMACS18_GNUS))
- (cd mh-e; make nemacs NEMACS=$(NEMACS))
+ (cd mh-e; make nemacs NEMACS=$(NEMACS) NEMACS_MH_E=$(NEMACS_MH_E))
install-nemacs: nemacs install-mua-18
make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=nemacs
-mule1: .lpath.el
+lpath-mule1:
+ ./make-lpath $(MULE1_OPT)
+
+mule1: lpath-mule1
make -f Makefile.bc all EMACS=$(MULE1) EMACS_TYPE=mule
(cd gnus; make mule1 MULE1=$(MULE1) EMACS18_GNUS=$(EMACS18_GNUS))
- (cd mh-e; make mule1 MULE1=$(MULE1))
+ (cd mh-e; make mule1 MULE1=$(MULE1) MULE1_MH_E=$(MULE1_MH_E))
install-mule1: mule1 install-mua-18
make -f Makefile.bc install TMDIR=$(TMDIR18) EMACS_TYPE=mule
(cd mh-e; make install-18 TMDIR18=$(TMDIR18))
-orig19: .lpath.el
+lpath-orig19:
+ ./make-lpath $(ORIG19_OPT)
+
+orig19: lpath-orig19
make -f Makefile.bc all EMACS=$(ORIG19) EMACS_TYPE=orig
(cd gnus; make orig19 ORIG19=$(ORIG19))
(cd mh-e; make orig19 ORIG19=$(ORIG19))
make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=orig
-mule2: .lpath.el
+lpath-mule2:
+ ./make-lpath $(MULE2_OPT)
+
+mule2: lpath-mule2
make -f Makefile.bc all EMACS=$(MULE2) EMACS_TYPE=mule
(cd gnus; make mule2 MULE2=$(MULE2))
(cd mh-e; make mule2 MULE2=$(MULE2))
;;;
-;;; tm-vm.el : tm-MUA for vm
+;;; tm-vm.el: tm-MUA for VM
+;;; This version is tested under VM-5.72 with tm-6.19.0
;;;
-;;; 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>
+;;; 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>
;;;
-;;; Plese insert (load "tm-vm") in .vm or .emacs.
+;;; Plese insert (require 'tm-vm) in your .vm or .emacs.
;;;
(provide 'tm-vm)
-
-(require 'tl-list)
(require 'tm-view)
(require 'vm)
(defconst tm-vm/RCS-ID
- "$Id: tm-vm.el,v 3.0 1995/03/26 17:16:53 morioka Exp $")
+ "$Id: tm-vm.el,v 6.0 1995/05/10 18:44:02 morioka Exp $")
(defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
(define-key vm-mode-map "Z" 'tm-vm/view-message)
+(define-key vm-mode-map "T" 'tm-vm/decode-message-header)
(set-alist 'mime-viewer/quitting-method-alist
'vm-mode
'vm-virtual-mode
'tm-vm/quit-view-message)
-
;;; @ for MIME header
;;;
;; If you don't use tiny-mime patch for VM (by RIKITAKE Kenji
;;; @ functions
;;;
-(defun tm-vm/quit-view-message()
+(defun tm-vm/quit-view-message ()
+ "Quit MIME-viewer and go back to VM.
+This function is called by `mime-viewer/quit' command via
+`mime-viewer/quitting-method-alist'."
(mime-viewer/kill-buffer)
- (let ((w (get-buffer-window mime/output-buffer-name)))
- (if w (delete-window w)))
- (vm-display vm-summary-buffer t
- '(mime-viewer/kill-buffer)
- '(this-command))
- (vm-widen-page)
- (goto-char (point-max))
- (widen)
- (narrow-to-region (point)
- (vm-vheaders-of
- (car vm-message-pointer)))
- (goto-char (point-min))
- (if vm-honor-page-delimiters
- (vm-narrow-to-page))
- (if vm-summary-buffer
- (select-window (get-buffer-window vm-summary-buffer)))
- )
+ (if (get-buffer mime/output-buffer-name)
+ (bury-buffer mime/output-buffer-name))
+ (vm-select-folder-buffer)
+ (vm-display (current-buffer) t '(mime-viewer/quit mime-viewer/up-content)
+ '(mime-viewer/quit reading-message)))
(defun tm-vm/view-message ()
- "Decode and view MIME message for VM"
+ "Decode and view MIME encoded message, under VM."
(interactive)
(vm-follow-summary-cursor)
(vm-select-folder-buffer)
(vm-error-if-folder-empty)
(vm-display (current-buffer) t '(tm-vm/view-message)
'(tm-vm/view-mesage reading-message))
- (vm-widen-page)
- (goto-char (point-max))
- (widen)
- (narrow-to-region (point) (vm-start-of (car vm-message-pointer)))
- (goto-char (point-min))
- (select-window (vm-get-buffer-window (current-buffer)))
- (mime/viewer-mode)
- )
+ (let* ((mp (car vm-message-pointer))
+ (ct (vm-get-header-contents mp "Content-Type:"))
+ (cte (vm-get-header-contents mp "Content-Transfer-Encoding:"))
+ (exposed (= (point-min) (vm-start-of mp))))
+ (save-restriction
+ (vm-widen-page)
+ ;; vm-widen-page hides exposed header if pages are delimited.
+ ;; So, here we expose it again.
+ (if exposed
+ (narrow-to-region (vm-start-of mp) (point-max)))
+ (select-window (vm-get-buffer-window (current-buffer)))
+ (mime/viewer-mode nil
+ (mime::parse-field-body/Content-Type (or ct ""))
+ cte))))
+
+(defun tm-vm/decode-message-header (&optional count)
+ "Decode MIME header of current message through tiny-mime.
+Numeric prefix argument COUNT means to decode the current message plus
+the next COUNT-1 messages. A negative COUNT means decode the current
+message and the previous COUNT-1 messages.
+When invoked on marked messages (via vm-next-command-uses-marks),
+all marked messages are affected, other messages are ignored."
+ (interactive "p")
+ (or count (setq count 1))
+ (vm-follow-summary-cursor)
+ (vm-select-folder-buffer)
+ (vm-check-for-killed-summary)
+ (vm-error-if-folder-empty)
+ (vm-error-if-folder-read-only)
+ (let ((mlist (vm-select-marked-or-prefixed-messages count))
+ (realm nil)
+ (vlist nil)
+ (vbufs nil))
+ (save-excursion
+ (while mlist
+ (setq realm (vm-real-message-of (car mlist)))
+ ;; Go to real folder of this message.
+ ;; But maybe this message is already real message...
+ (set-buffer (vm-buffer-of realm))
+ (let ((buffer-read-only nil))
+ (vm-save-restriction
+ (narrow-to-region (vm-headers-of realm) (vm-text-of realm))
+ (mime/decode-message-header))
+ (let ((vm-message-pointer (list realm))
+ (last-command nil))
+ (vm-discard-cached-data))
+ ;; Mark each virtual and real message for later summary
+ ;; update.
+ (setq vlist (cons realm (vm-virtual-messages-of realm)))
+ (while vlist
+ (vm-mark-for-summary-update (car vlist))
+ ;; Remember virtual and real folders related this message,
+ ;; for later display update.
+ (or (memq (vm-buffer-of (car vlist)) vbufs)
+ (setq vbufs (cons (vm-buffer-of (car vlist)) vbufs)))
+ (setq vlist (cdr vlist)))
+ (if (eq vm-flush-interval t)
+ (vm-stuff-virtual-attributes realm)
+ (vm-set-modflag-of realm t)))
+ (setq mlist (cdr mlist)))
+ ;; Update mail-buffers and summaries.
+ (while vbufs
+ (set-buffer (car vbufs))
+ (vm-preview-current-message)
+ (setq vbufs (cdr vbufs))))))