From: morioka Date: Mon, 9 Mar 1998 07:20:11 +0000 (+0000) Subject: tm 6.78. X-Git-Tag: tm6_78~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=bd8478fb3ae9e63ddc962abb81f030392061bb54;p=elisp%2Ftm.git tm 6.78. --- diff --git a/Changes-6.78.en b/Changes-6.78.en new file mode 100644 index 0000000..403f8e3 --- /dev/null +++ b/Changes-6.78.en @@ -0,0 +1,59 @@ +* tm + +tm/tiny-mime.el +---------------------------- +revision 6.6 +date: 1995/09/04 10:33:27; author: morioka; state: Exp; lines: +12 -15 +Created function `mime/exist-encoded-word-in-subject'. Function +`mime/encode-message-header' was changed to use it. +---------------------------- +revision 6.5 +date: 1995/09/04 10:14:13; author: morioka; state: Exp; lines: +1 -22 +Deleted unnecessary constants about Base64 and Quoted-Printable. +---------------------------- + +tm/tm-def.el +---------------------------- +revision 4.1 +date: 1995/09/04 10:17:02; author: morioka; state: Exp; lines: +7 -7 +Changed names of constans about encoding-word. +---------------------------- +revision 4.0 +date: 1995/09/04 10:15:01; author: morioka; state: Exp; lines: +31 -1 +Moved definitions of constants about Base64 and Quoted-Printable from +tiny-mime.el, and modified a little. +---------------------------- + +tm/tm-view.el +---------------------------- +revision 6.78 +date: 1995/09/05 01:08:55; author: morioka; state: Exp; lines: +3 -12 +Moved quitting method for GNUS 4 to tm-gnus4.el. +---------------------------- + + +* tm/gnus + + Attached version 6.20. + +tm/gnus/tm-gnus3.el +---------------------------- +revision 6.9 +date: 1995/09/05 01:29:20; author: morioka; state: Exp; lines: +24 -17 +autoload tm-view instead of requiring. +---------------------------- + +tm/gnus/tm-gnus4.el +---------------------------- +revision 6.8 +date: 1995/09/05 01:10:25; author: morioka; state: Exp; lines: +18 -1 +Defined quitting method for tm-view in this module. +---------------------------- + +tm/gnus/tm-gnus5.el +---------------------------- +revision 6.20 +date: 1995/09/04 10:53:07; author: morioka; state: Exp; lines: +2 -7 +Changed value of variable `gnus-show-mime-method' to simply (function +mime/decode-message-header). +---------------------------- diff --git a/Changes-6.78.ja b/Changes-6.78.ja new file mode 100644 index 0000000..8e559b5 --- /dev/null +++ b/Changes-6.78.ja @@ -0,0 +1,59 @@ +* tm + +tm/tiny-mime.el +---------------------------- +revision 6.6 +date: 1995/09/04 10:33:27; author: morioka; state: Exp; lines: +12 -15 +関数 mime/exist-encoded-word-in-subject を追加し、関数 +mime/encode-message-header の中でこれを使うようにした。 +---------------------------- +revision 6.5 +date: 1995/09/04 10:14:13; author: morioka; state: Exp; lines: +1 -22 +Base64 と Quoted-Printable に関する不要な定数を削除した。 +---------------------------- + +tm/tm-def.el +---------------------------- +revision 4.1 +date: 1995/09/04 10:17:02; author: morioka; state: Exp; lines: +7 -7 +encoding-word に関する定数の名前を変更した。 +---------------------------- +revision 4.0 +date: 1995/09/04 10:15:01; author: morioka; state: Exp; lines: +31 -1 +Base64 と Quoted-Printable に関する定数を tiny-mime.el から移し、少し +修正した。 +---------------------------- + +tm/tm-view.el +---------------------------- +revision 6.78 +date: 1995/09/05 01:08:55; author: morioka; state: Exp; lines: +3 -12 +GNUS 4 用の quitting method を tm-gnus4.el に移した。 +---------------------------- + + +* tm/gnus + + Version 6.20 を添付した。 + +tm/gnus/tm-gnus3.el +---------------------------- +revision 6.9 +date: 1995/09/05 01:29:20; author: morioka; state: Exp; lines: +24 -17 +tm-view を autoload するようにした。 +---------------------------- + +tm/gnus/tm-gnus4.el +---------------------------- +revision 6.8 +date: 1995/09/05 01:10:25; author: morioka; state: Exp; lines: +18 -1 +tm-view の quitting method この中で定義するようにした。 +---------------------------- + +tm/gnus/tm-gnus5.el +---------------------------- +revision 6.20 +date: 1995/09/04 10:53:07; author: morioka; state: Exp; lines: +2 -7 +変数 gnus-show-mime-method の値を単に (function +mime/decode-message-header) とした。 +---------------------------- diff --git a/Makefile b/Makefile index bd10f40..53994f3 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ TL_FILES = tl/README.eng \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm6.77.tar +TARFILE = tm6.78.tar nemacs: diff --git a/gnus/Makefile b/gnus/Makefile index dd474ed..919a91a 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -17,7 +17,7 @@ TMDIR19 = $(HOME)/lib/emacs19/lisp FILES = tm/gnus/*.el tm/doc/tm-gnus*.texi -TARFILE = tm-gnus6.19.tar +TARFILE = tm-gnus6.20.tar gnus3: diff --git a/gnus/g5-path b/gnus/g5-path index 6fd86b9..0e9686c 100644 --- a/gnus/g5-path +++ b/gnus/g5-path @@ -12,6 +12,6 @@ ;; ;; please edit this ;; - '("/usr/local/lib/emacs/site-lisp/gnus-5.1/lisp") + '("/usr/local/lib/emacs/site-lisp/gnus-5.0/lisp") ;; load-path)) diff --git a/gnus/tm-gnus3.el b/gnus/tm-gnus3.el index 4aabe48..2c638bf 100644 --- a/gnus/tm-gnus3.el +++ b/gnus/tm-gnus3.el @@ -4,7 +4,6 @@ (require 'tl-list) (require 'tl-str) -(require 'tm-view) (require 'tm-ognus) @@ -12,7 +11,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus3.el,v 6.8 1995/09/04 02:43:18 morioka Exp $") + "$Id: tm-gnus3.el,v 6.9 1995/09/05 01:29:20 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 3")) @@ -21,21 +20,7 @@ ;;; @ for tm-view ;;; -(set-alist 'mime-viewer/quitting-method-alist - 'gnus-Article-mode - (if (string-match (regexp-quote "3.14.4") gnus-version) - (function - (lambda () - (mime-viewer/kill-buffer) - (delete-other-windows) - (gnus-Article-show-summary) - )) - (function - (lambda () - (mime-viewer/kill-buffer) - (delete-other-windows) - (gnus-Article-show-subjects) - )))) +(autoload 'mime/viewer-mode "tm-view" "View MIME message." t) (defun tm-gnus/view-message (arg) "MIME decode and play this message." @@ -47,6 +32,28 @@ (mime/viewer-mode) ) +(call-after-loaded + 'tm-view + (function + (lambda () + (set-alist 'mime-viewer/quitting-method-alist + 'gnus-Article-mode + (if (string-match (regexp-quote "3.14.4") gnus-version) + (function + (lambda () + (mime-viewer/kill-buffer) + (delete-other-windows) + (gnus-Article-show-summary) + )) + (function + (lambda () + (mime-viewer/kill-buffer) + (delete-other-windows) + (gnus-Article-show-subjects) + )) + )) + ))) + ;;; @ Summary decoding ;;; diff --git a/gnus/tm-gnus4.el b/gnus/tm-gnus4.el index 924f90e..65eabb5 100644 --- a/gnus/tm-gnus4.el +++ b/gnus/tm-gnus4.el @@ -10,7 +10,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus4.el,v 6.7 1995/09/02 07:28:38 morioka Exp $") + "$Id: tm-gnus4.el,v 6.8 1995/09/05 01:10:25 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 4")) @@ -37,6 +37,23 @@ (gnus-summary-scroll-up -1) ) +(defun mime-viewer/quitting-method-for-gnus4 () + (mime-viewer/kill-buffer) + (delete-other-windows) + (gnus-article-show-summary) + (if (null gnus-have-all-headers) + (gnus-summary-select-article nil t) + )) + +(call-after-loaded + 'tm-view + (function + (lambda () + (set-alist 'mime-viewer/quitting-method-alist + 'gnus-article-mode + (function mime-viewer/quitting-method-for-gnus4)) + ))) + ;;; @ Summary decoding ;;; diff --git a/gnus/tm-gnus5.el b/gnus/tm-gnus5.el index 6216ac4..85edf97 100644 --- a/gnus/tm-gnus5.el +++ b/gnus/tm-gnus5.el @@ -11,7 +11,7 @@ ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-gnus5.el,v 6.19 1995/09/02 05:18:08 morioka Exp $") + "$Id: tm-gnus5.el,v 6.20 1995/09/04 10:53:07 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for GNUS 5")) @@ -105,12 +105,7 @@ article is automatic MIME decoded.") ;;; @ article filter ;;; -(setq gnus-show-mime-method - (function - (lambda () - (let (buffer-read-only) - (mime/decode-message-header) - )))) +(setq gnus-show-mime-method (function mime/decode-message-header)) ;;; @ automatic MIME preview support diff --git a/tiny-mime.el b/tiny-mime.el index 75ec647..905811c 100644 --- a/tiny-mime.el +++ b/tiny-mime.el @@ -21,7 +21,7 @@ ;;; (defconst mime/RCS-ID - "$Id: tiny-mime.el,v 6.4 1995/09/04 01:16:45 morioka Exp $") + "$Id: tiny-mime.el,v 6.6 1995/09/04 10:33:27 morioka Exp $") (defconst mime/tiny-mime-version (get-version-string mime/RCS-ID)) @@ -29,27 +29,6 @@ ;;; @ MIME encoded-word definition ;;; -(defconst mime/Base64-token-regexp "[A-Za-z0-9+/=]") -(defconst mime/Base64-encoded-text-regexp - (concat "\\(" - mime/Base64-token-regexp - mime/Base64-token-regexp - mime/Base64-token-regexp - mime/Base64-token-regexp - "\\)+")) -(defconst mime/Base64-encoding-and-encoded-text-regexp - (concat "\\(B\\)\\?" mime/Base64-encoded-text-regexp)) - -(defconst mime/Quoted-Printable-hex-char-regexp "[0123456789ABCDEF]") -(defconst mime/Quoted-Printable-octet-regexp - (concat "=" - mime/Quoted-Printable-hex-char-regexp - mime/Quoted-Printable-hex-char-regexp)) -(defconst mime/Quoted-Printable-encoded-text-regexp - (concat "\\([^=?]\\|" mime/Quoted-Printable-octet-regexp "\\)+")) -(defconst mime/Quoted-Printable-encoding-and-encoded-text-regexp - (concat "\\(Q\\)\\?" mime/Quoted-Printable-encoded-text-regexp)) - (defconst mime/encoded-text-regexp "[!->@-~]+") (defconst mime/encoded-word-regexp (concat (regexp-quote "=?") "\\(" @@ -214,6 +193,11 @@ )) )) +(defun mime/exist-encoded-word-in-subject () + (let ((str (message/get-field-body "Subject"))) + (if (and str (string-match mime/encoded-word-regexp str)) + str))) + (defun mime/encode-message-header () (interactive "*") (save-excursion @@ -239,20 +223,12 @@ ))) )) (if mime/use-X-Nsubject - (progn - (goto-char (point-min)) - (if (re-search-forward "^Subject:.*\\(\n\\s +.*\\)*" nil t) - (let ((str (buffer-substring (match-beginning 0) - (match-end 0)))) - (if (string-match mime/encoded-word-regexp str) - (insert (concat - "\nX-Nsubject: " - (nth 1 (message/divide-field - (mime/decode-string - (message/unfolding-string str)) - )))) - )) - ))) + (let ((str (mime/exist-encoded-word-in-subject))) + (if str + (insert (concat + "\nX-Nsubject: " + (mime/decode-string (message/unfolding-string str)) + ))))) ))) diff --git a/tm-def.el b/tm-def.el index 6a52c05..7c2b6e7 100644 --- a/tm-def.el +++ b/tm-def.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tm-def.el,v 3.0 1995/09/04 01:17:27 morioka Exp $ +;;; $Id: tm-def.el,v 4.1 1995/09/04 10:17:02 morioka Exp $ ;;; ;;; @ variables @@ -25,6 +25,36 @@ (defconst mime/charset-regexp mime/token-regexp) +;;; @@ Base64 +;;; + +(defconst base64-token-regexp "[A-Za-z0-9+/=]") + +(defconst mime/B-encoded-text-regexp + (concat "\\(" + base64-token-regexp + base64-token-regexp + base64-token-regexp + base64-token-regexp + "\\)+")) +(defconst mime/B-encoding-and-encoded-text-regexp + (concat "\\(B\\)\\?" mime/B-encoded-text-regexp)) + + +;;; @@ Quoted-Printable +;;; + +(defconst quoted-printable-hex-chars "0123456789ABCDEF") +(defconst quoted-printable-octet-regexp + (concat "=[" quoted-printable-hex-chars + "][" quoted-printable-hex-chars "]")) + +(defconst mime/Q-encoded-text-regexp + (concat "\\([^=?]\\|" quoted-printable-octet-regexp "\\)+")) +(defconst mime/Q-encoding-and-encoded-text-regexp + (concat "\\(Q\\)\\?" mime/Q-encoded-text-regexp)) + + ;;; @ end ;;; diff --git a/tm-view.el b/tm-view.el index 039880c..2745d83 100644 --- a/tm-view.el +++ b/tm-view.el @@ -21,7 +21,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.77 1995/09/04 00:48:30 morioka Exp $") + "$Id: tm-view.el,v 6.78 1995/09/05 01:08:55 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -255,20 +255,11 @@ (defvar mime::preview/original-major-mode nil) -;;; @@ quitting +;;; @@ quitting method ;;; -(defun mime-viewer/quitting-method-for-gnus4 () - (mime-viewer/kill-buffer) - (delete-other-windows) - (gnus-article-show-summary) - (if (null gnus-have-all-headers) - (gnus-summary-select-article nil t) - )) - (defvar mime-viewer/quitting-method-alist - '((gnus-article-mode . mime-viewer/quitting-method-for-gnus4) - (mime/show-message-mode + '((mime/show-message-mode . (lambda () (set-window-configuration mime/show-mode-old-window-configuration)