From: morioka Date: Mon, 2 Mar 1998 14:42:42 +0000 (+0000) Subject: tm 6.19.1 X-Git-Tag: tm6_19_1~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c17bac93d269cf94e612433cf9306dafc41e3bd9;p=elisp%2Ftm.git tm 6.19.1 --- diff --git a/Makefile b/Makefile index 540df8d..0701d10 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $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: @@ -17,16 +17,22 @@ # 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 @@ -41,24 +47,28 @@ FILES = tm/README.eng tm/rel-*.ol \ 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 @@ -68,7 +78,10 @@ install-mua-18: (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)) @@ -77,7 +90,10 @@ install-orig19: orig19 install-mua-19 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)) diff --git a/Makefile.bc b/Makefile.bc index 68d1fac..175bac7 100644 --- a/Makefile.bc +++ b/Makefile.bc @@ -1,5 +1,5 @@ # -# $Id: Makefile.bc,v 4.0 1995/04/27 21:05:48 morioka Exp $ +# $Id: Makefile.bc,v 5.0 1995/05/10 17:48:56 morioka Exp $ # TM_EL = signature.el \ @@ -10,10 +10,12 @@ TM_EL = signature.el \ TM_ELC = ${TM_EL:el=elc} ALL_EL = $(TM_EL) tm-vm.el tm-setup.el mime-setup.el +BATCH = $(EMACS) -batch -q .lpath.el -f eval-current-buffer + .SUFFIXES: .el .elc .el.elc: - $(EMACS) -batch -l .lpath.el -f batch-byte-compile $< + $(BATCH) -f batch-byte-compile $< all: $(TM_ELC) diff --git a/gnus/Makefile.bc b/gnus/Makefile.bc index 796a708..a85ce12 100644 --- a/gnus/Makefile.bc +++ b/gnus/Makefile.bc @@ -1,12 +1,13 @@ # -# $Id: Makefile.bc,v 6.0 1995/04/28 05:35:50 morioka Exp $ +# $Id: Makefile.bc,v 6.1 1995/05/10 17:51:38 morioka Exp $ # .SUFFIXES: .el .elc +BATCH = $(EMACS) -batch -q ../.lpath.el -f eval-current-buffer + .el.elc: - $(EMACS) -batch -l ../.lpath.el -l $(NNTP) -l $(GNUS) \ - -f batch-byte-compile $< + $(BATCH) -l $(NNTP) -l $(GNUS) -f batch-byte-compile $< all: tm-gnus.elc tm-$(GNUS_TYPE).elc diff --git a/make-lpath b/make-lpath index eb482a9..b5c4ab0 100755 --- a/make-lpath +++ b/make-lpath @@ -3,4 +3,8 @@ echo "(setq load-path" > .lpath.el echo " (nconc '("'"."' >> .lpath.el echo ' "'`pwd`'"' >> .lpath.el -echo ' "'`(cd ../tl; pwd)`'") load-path))' >> .lpath.el +echo ' "'`(cd ../tl; pwd)`'"' >> .lpath.el +foreach i ($argv) +echo ' "'$i'"' >> .lpath.el +end +echo ' ) load-path))' >> .lpath.el diff --git a/mh-e/Makefile b/mh-e/Makefile index 9ac79c3..0f77453 100644 --- a/mh-e/Makefile +++ b/mh-e/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 2.0 1995/04/28 05:28:00 morioka Exp morioka $ +# $Id: Makefile,v 4.0 1995/05/01 19:07:47 morioka Exp morioka $ # # Please specify emacs executables: @@ -9,7 +9,7 @@ # MULE2 = for MULE 2.* (based on Emacs 19.*) NEMACS = nemacs - MULE1 = mule + MULE1 = mule1 ORIG19 = emacs19 MULE2 = mule2 @@ -21,12 +21,11 @@ TMDIR18 = /usr/local/lib/emacs/local.lisp/tm TMDIR19 = /usr/local/lib/mule/site-lisp - nemacs: - make -f Makefile.bc tm-mh-e.elc EMACS=$(NEMACS) EMACS_TYPE=nemacs + make -f Makefile.bc tm-mh-e.elc EMACS=$(NEMACS) mule1: - make -f Makefile.bc tm-mh-e.elc EMACS=$(MULE1) EMACS_TYPE=mule + make -f Makefile.bc tm-mh-e.elc EMACS=$(MULE1) install-18: -chmod +w $(TMDIR18)/tm-mh-e*.el @@ -35,10 +34,10 @@ install-18: orig19: - make -f Makefile.bc mh-e4 EMACS=$(ORIG19) EMACS_TYPE=orig + make -f Makefile.bc mh-e4 EMACS=$(ORIG19) mule2: - make -f Makefile.bc mh-e4 EMACS=$(MULE2) EMACS_TYPE=mule + make -f Makefile.bc mh-e4 EMACS=$(MULE2) install-19: -chmod +w $(TMDIR19)/tm-mh-e*.el diff --git a/mh-e/Makefile.bc b/mh-e/Makefile.bc index fc4e252..30d0aaf 100644 --- a/mh-e/Makefile.bc +++ b/mh-e/Makefile.bc @@ -1,11 +1,13 @@ # -# $Id: Makefile.bc,v 2.0 1995/04/28 05:24:44 morioka Exp $ +# $Id: Makefile.bc,v 5.0 1995/05/10 17:50:31 morioka Exp $ # .SUFFIXES: .el .elc +BATCH = $(EMACS) -batch -q ../.lpath.el -f eval-current-buffer + .el.elc: - $(EMACS) -batch -l ../.lpath.el -f batch-byte-compile $< + $(BATCH) -l mh-e -f batch-byte-compile $< mh-e3: tm-mh-e.elc tm-mh-e3.elc diff --git a/tm-view.el b/tm-view.el index cb5ce0e..edd609e 100644 --- a/tm-view.el +++ b/tm-view.el @@ -21,7 +21,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.19 1995/04/28 06:13:27 morioka Exp $") + "$Id: tm-view.el,v 6.19 1995/04/28 06:13:27 morioka Exp morioka $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -165,7 +165,9 @@ (mime-viewer/kill-buffer) (delete-other-windows) (gnus-article-show-summary) - ) + (if (null gnus-have-all-headers) + (gnus-summary-select-article nil t) + )) (defun mime::viewer/quitting-method-for-rmail () (mime-viewer/kill-buffer) diff --git a/tm-vm.el b/tm-vm.el index 56b1b96..00c4b41 100644 --- a/tm-vm.el +++ b/tm-vm.el @@ -1,24 +1,25 @@ ;;; -;;; 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 -;;; modified by SHIONO -;;; and Steinar Bang +;;; Written by MASUTANI Yasuhiro +;;; Modified by SHIONO +;;; and Steinar Bang +;;; and Kenji Wakamiya ;;; -;;; 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 @@ -28,7 +29,6 @@ 'vm-virtual-mode 'tm-vm/quit-view-message) - ;;; @ for MIME header ;;; ;; If you don't use tiny-mime patch for VM (by RIKITAKE Kenji @@ -42,28 +42,19 @@ ;;; @ 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) @@ -71,11 +62,68 @@ (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))))))