From: morioka Date: Mon, 9 Mar 1998 11:01:01 +0000 (+0000) Subject: tm 7.13. X-Git-Tag: tm7_13~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=475cff608c49d7999800b5d8b22c66ef91f7df2f;p=elisp%2Ftm.git tm 7.13. --- diff --git a/Changes-7.13.en b/Changes-7.13.en new file mode 100644 index 0000000..75f2fea --- /dev/null +++ b/Changes-7.13.en @@ -0,0 +1,31 @@ +* tm + +tm/tm-parse.el +---------------------------- +revision 4.0 +date: 1995/10/12 06:08:12; author: morioka; state: Exp; lines: +12 -11 +rcnum (reversed content number) slot was added to `mime::content-info' +structure. +---------------------------- + +tm/tm-view.el +---------------------------- +revision 7.13 +date: 1995/10/12 06:10:04; author: morioka; state: Exp; lines: +6 -2 +In function `mime-viewer/display-content', `cnum' was made from +`rcnum' slot value of argument `content'. +---------------------------- + + +* tm/mh-e + + Attached version 7.02. + +tm/mh-e/tm-mh-e.el +---------------------------- +revision 7.2 +date: 1995/10/12 05:43:34; author: morioka; state: Exp; lines: +33 -106 +When it is automatic MIME preview mode, buffer name of preview buffer is +``show-+FOLDER'' and it is indicated from mh-show-buffer. Then article +buffer is created as ``article-+FOLDER''. +---------------------------- diff --git a/Changes-7.13.ja b/Changes-7.13.ja new file mode 100644 index 0000000..788aaaf --- /dev/null +++ b/Changes-7.13.ja @@ -0,0 +1,31 @@ +* tm + +tm/tm-parse.el +---------------------------- +revision 4.0 +date: 1995/10/12 06:08:12; author: morioka; state: Exp; lines: +12 -11 +mime::content-info 構造体に rcnum (reversed content number) slot を設 +けた。 +---------------------------- + +tm/tm-view.el +---------------------------- +revision 7.13 +date: 1995/10/12 06:10:04; author: morioka; state: Exp; lines: +6 -2 +関数 mime-viewer/display-content において、cnum を引数 content の +rcnum slot の情報から作るようにした。 +---------------------------- + + +* tm/mh-e + + Version 7.02 を添付した。 + +tm/mh-e/tm-mh-e.el +---------------------------- +revision 7.2 +date: 1995/10/12 05:43:34; author: morioka; state: Exp; lines: +33 -106 +automatic MIME preview mode の時、preview buffer の buffer 名を +show-+FOLDER とし、mh-show-buffer から指されるようにした。また、この時、 +article-+FOLDER という名前の article buffer を作るようにした。 +---------------------------- diff --git a/Makefile b/Makefile index 88edff7..aa45c1a 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ TL_FILES = tl/README.eng tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.12.tar +TARFILE = tm7.13.tar nemacs: diff --git a/mh-e/Makefile b/mh-e/Makefile index cd4ac7c..3f0c9e1 100644 --- a/mh-e/Makefile +++ b/mh-e/Makefile @@ -23,7 +23,7 @@ TMDIR19 = $(HOME)/lib/emacs19/lisp FILES = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol -TARFILE = tm-mh-e7.01.tar +TARFILE = tm-mh-e7.02.tar elc: diff --git a/mh-e/tm-mh-e.el b/mh-e/tm-mh-e.el index ce5a4b0..2a2eda9 100644 --- a/mh-e/tm-mh-e.el +++ b/mh-e/tm-mh-e.el @@ -26,7 +26,7 @@ ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 7.1 1995/10/07 08:26:47 morioka Exp $") + "$Id: tm-mh-e.el,v 7.2 1995/10/12 05:43:34 morioka Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -63,7 +63,18 @@ (setq buffer-read-only nil) (erase-buffer) (if mode - (progn + (let* ((aname (concat "article-" folder)) + (abuf (get-buffer aname)) + ) + (if abuf + (progn + (set-buffer abuf) + (setq buffer-read-only nil) + (erase-buffer) + ) + (setq abuf (get-buffer-create aname)) + (set-buffer abuf) + ) (let ((file-coding-system-for-read (if (boundp 'MULE) *noconv*)) kanji-fileio-code) @@ -76,7 +87,8 @@ (set-buffer-modified-p nil) (setq buffer-read-only t) (mh-show-mode) - (mime/viewer-mode) + (mime/viewer-mode nil nil nil + aname (concat "show-" folder)) (goto-char (point-min)) ) (let ((clean-message-header mh-clean-message-header) @@ -121,13 +133,12 @@ (defun tm-mh-e/view-message (&optional msg) "MIME decode and play this message." (interactive) - (mh-invalidate-show-buffer) - (let ((tm-mh-e/decode-all t)) - (mh-show-msg msg) - ) - (pop-to-buffer (save-window-excursion - (switch-to-buffer mh-show-buffer) - mime::article/preview-buffer)) + (if (null tm-mh-e/decode-all) + (let ((tm-mh-e/decode-all t)) + (mh-invalidate-show-buffer) + (mh-show-msg msg) + )) + (pop-to-buffer mh-show-buffer) ) (defun tm-mh-e/toggle-decoding-mode (arg) @@ -138,91 +149,16 @@ With arg, turn MIME processing on if arg is positive." (if (null arg) (not tm-mh-e/decode-all) arg)) - (save-window-excursion - (switch-to-buffer mh-show-buffer) + (save-excursion + (set-buffer mh-show-buffer) (if (null tm-mh-e/decode-all) - (if (and mime::article/preview-buffer - (get-buffer mime::article/preview-buffer)) - (kill-buffer mime::article/preview-buffer) + (if (and mime::preview/article-buffer + (get-buffer mime::preview/article-buffer)) + (kill-buffer mime::preview/article-buffer) ))) + (mh-invalidate-show-buffer) (mh-show (mh-get-msg-num t)) - (if tm-mh-e/decode-all - (let ((the-buf (current-buffer))) - (if mime::article/preview-buffer - (pop-to-buffer (save-excursion - (switch-to-buffer mh-show-buffer) - mime::article/preview-buffer)) - (tm-mh-e/view-message (mh-get-msg-num t))) - (pop-to-buffer the-buf) - ))) - -(defun tm-mh-e/page-msg () - (interactive) - (if tm-mh-e/decode-all - (scroll-other-window) - (mh-page-msg) - )) - -(defun tm-mh-e/previous-page () - (interactive) - (if tm-mh-e/decode-all - (scroll-other-window (- (save-window-excursion - (other-window 1) - (window-height)))) - (mh-previous-page) - )) - -(defun tm-mh-e/cite () - (interactive) - (if tm-mh-e/decode-all - (progn - (if mh-delete-yanked-msg-window - (save-excursion - (set-buffer mh-sent-from-folder) - (set-buffer mh-show-buffer) - (delete-windows-on mime::article/preview-buffer) - )) - (save-excursion - (save-restriction - (insert-buffer - (save-excursion - ;; 1995/9/21, - ;; modified by Eric Ding - ;; (c.f. tm-eng:104) - (set-buffer mh-sent-from-folder) - (set-buffer mh-show-buffer) - (or mime::article/preview-buffer (current-buffer)) - ;; end - )) - (if (looking-at "^\\[.+\\(\n[ \t].+\\)*\\]\n") - (replace-match "")) - (narrow-to-region (point)(point-max)) - (mh-insert-prefix-string mh-ins-buf-prefix) - ))) - (mh-yank-cur-msg) - )) - -(defun tm-mh-e/toggle-showing () - "Toggle the scanning mode/showing mode of displaying messages." - (interactive) - (if mh-showing - (if tm-mh-e/decode-all - (let ((pbuf - (save-window-excursion - (set-buffer mh-show-buffer) - mime::article/preview-buffer))) - (if (get-buffer pbuf) - (delete-windows-on pbuf) - ) - (setq mh-showing nil) - (set-buffer-modified-p (buffer-modified-p)) ;force mode line update - (if mh-recenter-summary-p - (mh-recenter nil) - )) - (mh-set-scan-mode) - ) - (mh-show) - )) + ) ;;; @ for tm-view @@ -254,7 +190,7 @@ With arg, turn MIME processing on if arg is positive." (defun tm-mh-e/quitting-method () (let ((win (get-buffer-window mime/output-buffer-name)) - (buf mime::preview/article-buffer) + (buf (current-buffer)) ) (if win (delete-window win) @@ -264,8 +200,10 @@ With arg, turn MIME processing on if arg is positive." (substring name 5) )) (if (not tm-mh-e/decode-all) - (mh-show (mh-get-msg-num t)) - ))) + (mh-invalidate-show-buffer) + ) + (mh-show (mh-get-msg-num t)) + )) ;;; @ for tm-comp @@ -331,11 +269,8 @@ With arg, turn MIME processing on if arg is positive." ;;; @ set up ;;; -;;(add-hook 'mh-show-mode-hook (function mime/viewer-mode)) - (define-key mh-folder-mode-map "v" (function tm-mh-e/view-message)) (define-key mh-folder-mode-map "\et" (function tm-mh-e/toggle-decoding-mode)) -(define-key mh-folder-mode-map "t" (function tm-mh-e/toggle-showing)) (define-key mh-folder-mode-map "\r" (function (lambda () (interactive) @@ -346,14 +281,6 @@ With arg, turn MIME processing on if arg is positive." (interactive) (scroll-other-window -1) ))) -(define-key mh-folder-mode-map " " (function tm-mh-e/page-msg)) -(define-key mh-folder-mode-map "\177" (function tm-mh-e/previous-page)) - -(add-hook 'mh-letter-mode-hook - (function - (lambda () - (define-key mh-letter-mode-map "\C-c\C-y" (function tm-mh-e/cite)) - ))) (defun tm-mh-e/summary-before-quit () (let ((buf (get-buffer mh-show-buffer))) diff --git a/tm-parse.el b/tm-parse.el index e1d2c30..88f3e34 100644 --- a/tm-parse.el +++ b/tm-parse.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-parse.el,v 3.0 1995/10/05 11:28:40 morioka Exp $ +;;; $Id: tm-parse.el,v 4.0 1995/10/12 06:08:12 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -80,10 +80,10 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" ;;; (define-structure mime::content-info - point-min point-max type parameters encoding children) + rcnum point-min point-max type parameters encoding children) -(defun mime/parse-multipart (boundary ctype params encoding) +(defun mime/parse-multipart (boundary ctype params encoding rcnum) (goto-char (point-min)) (let ((beg (point-min)) (end (if (re-search-forward @@ -95,7 +95,7 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" (dc-ctl (cond ((string= ctype "multipart/digest") '("message/rfc822")) (t '("text/plain")))) - cb ce ct ret ncb children) + cb ce ct ret ncb children (i 0)) (save-restriction (narrow-to-region beg end) (goto-char beg) @@ -106,24 +106,25 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" (setq ncb (match-end 0)) (save-restriction (narrow-to-region cb ce) - (setq ret (mime/parse-message dc-ctl "7bit")) + (setq ret (mime/parse-message dc-ctl "7bit" (cons i rcnum))) ) (setq children (cons ret children)) (goto-char (mime::content-info/point-max ret)) (goto-char (setq cb ncb)) + (setq i (1+ i)) ) (setq ce (point-max)) (save-restriction (narrow-to-region cb ce) - (setq ret (mime/parse-message dc-ctl "7bit")) + (setq ret (mime/parse-message dc-ctl "7bit" (cons i rcnum))) ) (setq children (cons ret children)) ) - (mime::content-info/create beg end ctype params encoding + (mime::content-info/create rcnum beg end ctype params encoding (reverse children)) )) -(defun mime/parse-message (&optional ctl encoding) +(defun mime/parse-message (&optional ctl encoding rcnum) "Parse current-buffer as a MIME message. [tm-parse.el]" (setq ctl (or (mime/Content-Type) ctl)) (setq encoding (or (mime/Content-Transfer-Encoding) encoding)) @@ -133,11 +134,11 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" (let ((boundary (assoc "boundary" params))) (cond (boundary (setq boundary (rfc822/strip-quoted-string (cdr boundary))) - (mime/parse-multipart boundary ctype params encoding) + (mime/parse-multipart boundary ctype params encoding rcnum) ) ((string= ctype "message/rfc822") (goto-char (point-min)) - (mime::content-info/create (point-min) (point-max) + (mime::content-info/create rcnum (point-min) (point-max) ctype params encoding (save-restriction (narrow-to-region @@ -151,7 +152,7 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" ) ) (t - (mime::content-info/create (point-min) (point-max) + (mime::content-info/create rcnum (point-min) (point-max) ctype params encoding nil) )) ))) diff --git a/tm-view.el b/tm-view.el index 5e8bac7..c9f513e 100644 --- a/tm-view.el +++ b/tm-view.el @@ -25,7 +25,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.12 1995/10/11 12:12:06 morioka Exp $") + "$Id: tm-view.el,v 7.13 1995/10/12 06:10:04 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -358,8 +358,12 @@ The compressed face will be piped to this command.") (ctype (mime::content-info/type content)) (params (mime::content-info/parameters content)) (encoding (mime::content-info/encoding content)) - (cnum (mime-article/point-content-number beg cinfo)) + (cnum (mime::content-info/rcnum content)) he e nb ne subj) + (setq cnum + (if cnum + (reverse cnum) + t)) (set-buffer ibuf) (goto-char beg) (setq he (if (re-search-forward "^$" nil t)