--- /dev/null
+* tm
+
+tm/mime-setup.el
+----------------------------
+revision 7.4
+date: 1995/10/17 16:20:39; author: morioka; state: Exp; lines: +4 -1
+In variable `mime-file-types', setting for *.diff.
+----------------------------
+
+tm/tm-ew-d.el
+----------------------------
+revision 7.5
+date: 1995/10/18 11:18:03; author: morioka; state: Exp; lines: +2 -1
+Function `mime-eword/decode-string' unfolds string.
+----------------------------
+revision 7.4
+date: 1995/10/17 16:45:27; author: morioka; state: Exp; lines: +4 -4
+Function `mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string', function
+`mime/decode-encoded-words-region' was renamed to
+`mime-eword/decode-region'.
+----------------------------
+revision 7.3
+date: 1995/10/17 16:39:47; author: morioka; state: Exp; lines: +8 -2
+Version constant `mime/eword-decoder-version' was defined.
+----------------------------
+
+tm/tm-ew-e.el
+----------------------------
+revision 7.4
+date: 1995/10/18 08:54:59; author: morioka; state: Exp; lines: +6 -1
+Function `mime-eword/encode-string' was created.
+----------------------------
+revision 7.3
+date: 1995/10/17 16:37:25; author: morioka; state: Exp; lines: +9 -3
+Version constant `mime/eword-encoder-version' was defined.
+----------------------------
+revision 7.2
+date: 1995/10/17 16:32:15; author: morioka; state: Exp; lines: +94 -1
+Public functions about encoded-word encoder were moved from
+tm-eword.el.
+----------------------------
+
+tm/tm-eword.el
+----------------------------
+revision 7.9
+date: 1995/10/18 08:55:37; author: morioka; state: Exp; lines: +8 -6
+Function `mime-eword/encode-string' was defined.
+----------------------------
+revision 7.8
+date: 1995/10/17 16:46:33; author: morioka; state: Exp; lines: +3 -3
+Function `mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string', function
+`mime/decode-encoded-words-region' was renamed to
+`mime-eword/decode-region'.
+----------------------------
+revision 7.7
+date: 1995/10/17 16:33:57; author: morioka; state: Exp; lines: +1 -3
+tm-eword-load-hook was deleted.
+----------------------------
+revision 7.6
+date: 1995/10/17 16:33:26; author: morioka; state: Exp; lines: +2 -10
+version constant was deleted.
+----------------------------
+revision 7.5
+date: 1995/10/17 16:31:20; author: morioka; state: Exp; lines: +4 -97
+Functions about encoded-word encoder were moved to tm-ew-e.el.
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.16
+date: 1995/10/17 16:48:06; author: morioka; state: Exp; lines: +2 -2
+Function `mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string'.
+----------------------------
+
+tm/tm-vm.el
+----------------------------
+revision 7.1
+date: 1995/10/17 16:49:51; author: morioka; state: Exp; lines: +2 -2
+Comment was modified because function
+`mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string'.
+----------------------------
+
+
+tm/mh-e
+
+ Attached version 7.05.
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 7.5
+date: 1995/10/18 09:57:56; author: morioka; state: Exp; lines: +14 -14
+(1) When `,' key is pressed, encoded-words are not decoded.
+(2) When `,' key is pressed in automatic MIME preview mode, article
+ buffer is displayed.
+----------------------------
+revision 7.4
+date: 1995/10/18 09:43:43; author: morioka; state: Exp; lines: +18 -6
+(1) New implementation about `.' and `,'.
+(2) When `,' key is pressed in automatic MIME preview mode, it displays
+ preview buffer which has all headers.
+----------------------------
+
+
+tm/gnus
+
+ Attached version 7.04.
+
+tm/gnus/tm-gnus5.el
+----------------------------
+revision 7.3
+date: 1995/10/17 16:52:54; author: morioka; state: Exp; lines: +6 -6
+Function `mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string'.
+----------------------------
+
+tm/gnus/tm-ognus.el
+----------------------------
+revision 7.1
+date: 1995/10/17 16:56:12; author: morioka; state: Exp; lines: +6 -7
+Function `mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string'.
+----------------------------
+
+tm/gnus/tm-sgnus.el
+----------------------------
+revision 7.4
+date: 1995/10/18 08:32:36; author: morioka; state: Exp; lines: +39 -8
+(1) alias `mime/decode-encoded-words-string' was defined to indicate
+ `mime-eword/decode-string'. It is for old nnheader patch.
+
+(2) Function `tm-gnus/article-hide-headers-if-wanted' is added to
+ `gnus-article-display-hook' instead of
+ `gnus-article-hide-headers-if-wanted'. It does not call function
+ `gnus-article-hide-headers-if-wanted' when automatic MIME preview
+ mode.
+----------------------------
+revision 7.3
+date: 1995/10/17 16:58:05; author: morioka; state: Exp; lines: +4 -4
+Function `mime/decode-encoded-words-string' was renamed to
+`mime-eword/decode-string'.
+----------------------------
--- /dev/null
+* tm
+
+tm/mime-setup.el
+----------------------------
+revision 7.4
+date: 1995/10/17 16:20:39; author: morioka; state: Exp; lines: +4 -1
+\e$BJQ?t\e(B mime-file-types \e$B$K\e(B *.diff \e$B$r@_Dj$7$?!#\e(B
+----------------------------
+
+tm/tm-ew-d.el
+----------------------------
+revision 7.5
+date: 1995/10/18 11:18:03; author: morioka; state: Exp; lines: +2 -1
+\e$B4X?t\e(B mime-eword/decode-string \e$B$G\e(B unfolding \e$B$9$k$h$&$K$7$?!#\e(B
+----------------------------
+revision 7.4
+date: 1995/10/17 16:45:27; author: morioka; state: Exp; lines: +4 -4
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K!"\e(B
+\e$B4X?t\e(B mime/decode-encoded-words-region \e$B$r\e(B `mime-eword/decode-region' \e$B$K\e(B
+\e$B2~L>$7$?!#\e(B
+----------------------------
+revision 7.3
+date: 1995/10/17 16:39:47; author: morioka; state: Exp; lines: +8 -2
+version \e$BDj?t\e(B `mime/eword-decoder-version' \e$B$rDj5A$7$?!#\e(B
+----------------------------
+
+tm/tm-ew-e.el
+----------------------------
+revision 7.4
+date: 1995/10/18 08:54:59; author: morioka; state: Exp; lines: +6 -1
+\e$B4X?t\e(B mime-eword/encode-string \e$B$rDI2C$7$?!#\e(B
+----------------------------
+revision 7.3
+date: 1995/10/17 16:37:25; author: morioka; state: Exp; lines: +9 -3
+version \e$BDj?t\e(B `mime/eword-encoder-version' \e$B$r?7@_$7$?!#\e(B
+----------------------------
+revision 7.2
+date: 1995/10/17 16:32:15; author: morioka; state: Exp; lines: +94 -1
+encoded-word \e$B$N\e(B encode \e$B$K4X$9$k8x3+MQ$N4X?t$r\e(B tm-eword.el \e$B$+$i0\$7$?!#\e(B
+----------------------------
+
+tm/tm-eword.el
+----------------------------
+revision 7.9
+date: 1995/10/18 08:55:37; author: morioka; state: Exp; lines: +8 -6
+\e$B4X?t\e(B mime-eword/encode-string \e$B$rDI2C$7$?!#\e(B
+----------------------------
+revision 7.8
+date: 1995/10/17 16:46:33; author: morioka; state: Exp; lines: +3 -3
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K!"\e(B
+\e$B4X?t\e(B mime/decode-encoded-words-region \e$B$r\e(B `mime-eword/decode-region' \e$B$K\e(B
+\e$B2~L>$7$?!#\e(B
+----------------------------
+revision 7.7
+date: 1995/10/17 16:33:57; author: morioka; state: Exp; lines: +1 -3
+tm-eword-load-hook \e$B$rGQ;_$7$?!#\e(B
+----------------------------
+revision 7.6
+date: 1995/10/17 16:33:26; author: morioka; state: Exp; lines: +2 -10
+version \e$BDj?t$rGQ;_$7$?!#\e(B
+----------------------------
+revision 7.5
+date: 1995/10/17 16:31:20; author: morioka; state: Exp; lines: +4 -97
+encode \e$B4X78$N4X?t$rA4$F\e(B tm-ew-e.el \e$B$K0\$7$?!#\e(B
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.16
+date: 1995/10/17 16:48:06; author: morioka; state: Exp; lines: +2 -2
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K\e(B
+\e$B2~L>$7$?!#\e(B
+----------------------------
+
+tm/tm-vm.el
+----------------------------
+revision 7.1
+date: 1995/10/17 16:49:51; author: morioka; state: Exp; lines: +2 -2
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K\e(B
+\e$B2~L>$7$?$3$H$KH<$$!"\e(Bcomment \e$B$r=$@5$7$?!#\e(B
+----------------------------
+
+
+tm/mh-e
+
+ Version 7.05 \e$B$rE:IU$7$?!#\e(B
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 7.5
+date: 1995/10/18 09:57:56; author: morioka; state: Exp; lines: +14 -14
+(1) `,' \e$B$r2!$7$?;~!"\e(Bencoded-word \e$B$O\e(B decode \e$B$7$J$$$h$&$K$7$?!#\e(B
+(2) automatic MIME preview mode \e$B$N;~$K\e(B `,' \e$B$r2!$7$?>l9g!"\e(Barticle
+ buffer \e$B$rI=<($9$k$h$&$K$7$?!#\e(B
+----------------------------
+revision 7.4
+date: 1995/10/18 09:43:43; author: morioka; state: Exp; lines: +18 -6
+(1) `.' \e$B$H\e(B `,' \e$B$r<B8=$9$k4X?t$r:n$jD>$7$?!#\e(B
+(2) automatic MIME preview mode \e$B$K$*$$$F\e(B `,' \e$B$r2!$7$?;~!"\e(Bheader \e$B$rA4It\e(B
+ \e$BI=<($7$?\e(B preview buffer \e$B$rI=<($9$k$h$&$K$7$?!#\e(B
+----------------------------
+
+
+tm/gnus
+
+ Version 7.04 \e$B$rE:IU$7$?!#\e(B
+
+tm/gnus/tm-gnus5.el
+----------------------------
+revision 7.3
+date: 1995/10/17 16:52:54; author: morioka; state: Exp; lines: +6 -6
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K\e(B
+\e$B2~L>$7$?!#\e(B
+----------------------------
+
+tm/gnus/tm-ognus.el
+----------------------------
+revision 7.1
+date: 1995/10/17 16:56:12; author: morioka; state: Exp; lines: +6 -7
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K\e(B
+\e$B2~L>$7$?!#\e(B
+----------------------------
+
+tm/gnus/tm-sgnus.el
+----------------------------
+revision 7.4
+date: 1995/10/18 08:32:36; author: morioka; state: Exp; lines: +39 -8
+(1) \e$B4X?t\e(B mime/decode-encoded-words-string \e$B$,\e(B
+ `mime-eword/decode-string' \e$B$K2~L>$5$l$?;v$KH<$$!"8E$$\e(B Gnus 5.0.*
+ nnheader patch \e$B$r9MN8$7$F!"4X?t\e(B mime-eword/decode-string \e$B$r\e(B
+ `mime/decode-encoded-words-string' \e$B$K\e(B alias \e$B$7$?!#\e(B
+
+(2) gnus-article-display-hook \e$B$+$i4X?t\e(B
+ gnus-article-hide-headers-if-wanted \e$B$r<h$j=|$-!"Be$o$j$K!"\e(B
+ automatic MIME preview mode \e$B$N;~0J30$K$N$_\e(B
+ gnus-article-hide-headers-if-wanted \e$B$r\e(B \e$BF0$+$94X?t\e(B
+ tm-gnus/article-hide-headers-if-wanted \e$B$r@_Dj$7$?!#\e(B
+----------------------------
+revision 7.3
+date: 1995/10/17 16:58:05; author: morioka; state: Exp; lines: +4 -4
+\e$B4X?t\e(B mime/decode-encoded-words-string \e$B$r\e(B `mime-eword/decode-string' \e$B$K\e(B
+\e$B2~L>$7$?!#\e(B
+----------------------------
FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
-TARFILE = tm7.15.tar
+TARFILE = tm7.16.tar
nemacs:
FILES = tm/gnus/*.el tm/doc/tm-gnus*.texi
-TARFILE = tm-gnus7.02.1.tar
+TARFILE = tm-gnus7.04.tar
gnus3:
;;
;; please edit this
;;
- '("/usr/local/lib/emacs/site-lisp/gnus-5.0.6/lisp")
+ '("/usr/local/lib/emacs/site-lisp/gnus-5.0.8/lisp")
;;
load-path))
(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
(autoload 'mime/decode-message-header
- "tm-ew-d" "Decode MIME encoded-word." t)
-(autoload 'mime/decode-encoded-words-string
- "tm-ew-d" "Decode MIME encoded-word." t)
+ "tm-ew-d" "Decode MIME encoded-words in message header." t)
+(autoload 'mime-eword/decode-string
+ "tm-ew-d" "Decode MIME encoded-words in string." t)
;;; @ version
;;;
(defconst tm-gnus/RCS-ID
- "$Id: tm-gnus5.el,v 7.2 1995/10/05 12:57:53 morioka Exp $")
+ "$Id: tm-gnus5.el,v 7.3 1995/10/17 16:52:54 morioka Exp $")
(defconst tm-gnus/version
(concat (get-version-string tm-gnus/RCS-ID) " for GNUS 5"))
(mail-header-set-from
header
(if from
- (mime/decode-encoded-words-string from)
+ (mime-eword/decode-string from)
""))
(mail-header-set-subject
header
(if subj
- (mime/decode-encoded-words-string subj)
+ (mime-eword/decode-string subj)
""))
))
gnus-newsgroup-headers)
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Version:
-;;; $Id: tm-ognus.el,v 7.0 1995/10/03 05:08:59 morioka Exp $
+;;; $Id: tm-ognus.el,v 7.1 1995/10/17 16:56:12 morioka Exp $
;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
;;;
;;; This file is part of tm (Tools for MIME).
(require 'gnus)
(autoload 'mime/decode-message-header
- "tm-ew-d" "Decode MIME encoded-word." t)
-(autoload 'mime/decode-encoded-words-string
- "tm-ew-d" "Decode MIME encoded-word." t)
+ "tm-ew-d" "Decode MIME encoded-words in message header." t)
+(autoload 'mime-eword/decode-string
+ "tm-ew-d" "Decode MIME encoded-words in string." t)
(defvar tm-gnus/decoding-mode t "*Decode MIME header if non-nil.")
(let ((maxlen 15) ;Maximum subject length
(subject
(if gnus-current-headers
- (mime/decode-encoded-words-string
+ (mime-eword/decode-string
(nntp-header-subject gnus-current-headers))
"")
))
(lambda (header)
(let ((subj (or (gnus-header-subject header) "")))
(nntp-set-header-subject
- header
- (mime/decode-encoded-words-string subj))
+ header (mime-eword/decode-string subj))
)))
gnus-newsgroup-headers)
)
(autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
(autoload 'mime/decode-message-header
"tm-ew-d" "Decode MIME encoded-words in message header." t)
-(autoload 'mime/decode-encoded-words-string
+(autoload 'mime-eword/decode-string
"tm-ew-d" "Decode MIME encoded-words in string." t)
;;;
(defconst tm-gnus/RCS-ID
- "$Id: tm-sgnus.el,v 7.2 1995/10/11 10:20:29 morioka Exp $")
+ "$Id: tm-sgnus.el,v 7.4 1995/10/18 08:32:36 morioka Exp $")
(defconst tm-gnus/version
(concat (get-version-string tm-gnus/RCS-ID) " for September"))
(gnus-summary-scroll-up -1)
)
+(defun tm-gnus/summary-toggle-header (&optional arg)
+ (interactive "P")
+ (if (and tm-gnus/decode-all gnus-show-mime)
+ (let ((mime-viewer/ignored-field-list
+ (if (save-excursion
+ (set-buffer gnus-article-buffer)
+ (some-element
+ (lambda (field)
+ (rfc822/get-field-body field)
+ )
+ mime-viewer/ignored-field-list))
+ mime-viewer/ignored-field-list)))
+ (gnus-summary-select-article t t)
+ )
+ (gnus-summary-toggle-header arg)
+ ))
+
(define-key gnus-summary-mode-map "v" (function tm-gnus/view-message))
(define-key gnus-summary-mode-map
"\e\r" (function tm-gnus/summary-scroll-down))
+(define-key gnus-summary-mode-map
+ "t" (function tm-gnus/summary-toggle-header))
;;; @ for tm-view
(mail-header-set-from
header
(if from
- (mime/decode-encoded-words-string from)
+ (mime-eword/decode-string from)
""))
(mail-header-set-subject
header
(if subj
- (mime/decode-encoded-words-string subj)
+ (mime-eword/decode-string subj)
""))
))
gnus-newsgroup-headers)
(add-hook 'gnus-select-group-hook
(function tm-gnus/decode-summary-from-and-subjects))
+ )
+ (t
+ (defalias 'mime/decode-encoded-words-string 'mime-eword/decode-string)
))
;;;
(defun tm-gnus/preview-article ()
- (let (mime-viewer/ignored-field-list)
- (make-local-variable 'tm:mother-button-dispatcher)
- (setq tm:mother-button-dispatcher
- (function gnus-article-push-button))
- (mime/viewer-mode nil nil nil gnus-original-article-buffer
- gnus-article-buffer)
- ))
+ (make-local-variable 'tm:mother-button-dispatcher)
+ (setq tm:mother-button-dispatcher
+ (function gnus-article-push-button))
+ (mime/viewer-mode nil nil nil gnus-original-article-buffer
+ gnus-article-buffer)
+ )
(defun tm-gnus/set-mime-method (mode)
(setq gnus-show-mime-method
(setq gnus-show-mime t)
+(defun tm-gnus/article-hide-headers-if-wanted ()
+ (if (not (and gnus-show-mime tm-gnus/decode-all))
+ (gnus-article-hide-headers-if-wanted)
+ ))
+
+(remove-hook 'gnus-article-display-hook
+ 'gnus-article-hide-headers-if-wanted)
+(add-hook 'gnus-article-display-hook
+ 'tm-gnus/article-hide-headers-if-wanted)
+
;;; @ for tm-comp
;;;
FILES = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol
-TARFILE = tm-mh-e7.03.tar
+TARFILE = tm-mh-e7.05.tar
elc:
;;;
(defconst tm-mh-e/RCS-ID
- "$Id: tm-mh-e.el,v 7.3 1995/10/13 08:15:17 morioka Exp $")
+ "$Id: tm-mh-e.el,v 7.5 1995/10/18 09:57:56 morioka Exp $")
(defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
(defvar tm-mh-e/decode-all t
"*If t, decode all of the message. Otherwise decode header only.")
+(defvar tm-mh-e/show-all-header nil)
+
+(defvar tm-mh-e/decode-encoded-word t)
+
;;; @ functions
;;;
(defun mh-display-msg (msg-num folder &optional show-buffer mode)
(or mode
- (setq mode tm-mh-e/decode-all)
+ (setq mode (and tm-mh-e/decode-all (not tm-mh-e/show-all-header)))
)
;; Display message NUMBER of FOLDER.
;; Sets the current buffer to the show buffer.
(goto-char (point-min)))
(t
(mh-start-of-uncleaned-message)))
- (mime/decode-message-header)
+ (if tm-mh-e/decode-encoded-word
+ (mime/decode-message-header)
+ )
(set-buffer-modified-p nil)
(setq buffer-read-only t)
(mh-show-mode)
(mh-show (mh-get-msg-num t))
)
+(defun tm-mh-e/show (&optional message)
+ (interactive)
+ (setq tm-mh-e/show-all-header nil)
+ (setq tm-mh-e/decode-encoded-word t)
+ (mh-invalidate-show-buffer)
+ (mh-show message)
+ )
+
(defun tm-mh-e/header-display ()
(interactive)
- (if tm-mh-e/decode-all
- (let ((win (selected-window)))
- (pop-to-buffer mh-show-buffer)
- (switch-to-buffer mime::preview/article-buffer)
- (goto-char (point-min))
- (select-window win)
- )
+ (setq tm-mh-e/show-all-header t)
+ (setq tm-mh-e/decode-encoded-word nil)
+ (mh-invalidate-show-buffer)
+ (let (mime-viewer/ignored-field-list)
(mh-header-display)
))
(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 "." (function tm-mh-e/show))
(define-key mh-folder-mode-map "," (function tm-mh-e/header-display))
(define-key mh-folder-mode-map "\r"
(function (lambda ()
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Version:
-;;; $Id: mime-setup.el,v 7.3 1995/10/06 07:17:22 morioka Exp $
+;;; $Id: mime-setup.el,v 7.4 1995/10/17 16:20:39 morioka Exp $
;;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
;;;
;;; This file is part of tm (Tools for MIME).
"application" "octet-stream" (("name" . file)
("type" . "tar")
("conversions" . "gzip")) nil)
+ ("\\.diff$"
+ "application" "octet-stream" (("name" . file)
+ ("type" . "patch")) nil)
("\\.signature"
"text" "plain" nil nil)
(".*" nil nil nil nil))
;;;
;;; Author: ENAMI Tsugutomo <enami@sys.ptg.sony.co.jp>
;;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version:
-;;; $Id: tm-ew-d.el,v 7.2 1995/10/05 12:20:36 morioka Exp $
;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
;;;
(require 'tm-def)
+;;; @ version
+;;;
+
+(defconst tm-ew-d/RCS-ID
+ "$Id: tm-ew-d.el,v 7.5 1995/10/18 11:18:03 morioka Exp $")
+(defconst mime/eword-decoder-version (get-version-string tm-ew-d/RCS-ID))
+
+
;;; @ MIME encoded-word definition
;;;
;;; @ for string
;;;
-(defun mime/decode-encoded-words-string (str)
+(defun mime-eword/decode-string (str)
+ (setq str (rfc822/unfolding-string str))
(let ((dest "")(ew nil)
beg end)
(while (setq beg (string-match mime/encoded-word-regexp str))
;;; @ for region
;;;
-(defun mime/decode-encoded-words-region (beg end &optional unfolding)
+(defun mime-eword/decode-region (beg end &optional unfolding)
(interactive "*r")
(save-excursion
(save-restriction
(save-restriction
(narrow-to-region (goto-char (point-min))
(progn (re-search-forward "^$" nil t) (point)))
- (mime/decode-encoded-words-region (point-min) (point-max) t)
+ (mime-eword/decode-region (point-min) (point-max) t)
)))
(defun mime/unfolding ()
;;; Copyright (C) 1995 Free Software Foundation, Inc.
;;; Copyright (C) 1993,1994,1995 MORIOKA Tomohiko
;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version:
-;;; $Id: tm-ew-e.el,v 7.1 1995/10/11 11:56:46 morioka Exp $
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
;;;
(require 'tm-def)
+;;; @ version
+;;;
+
+(defconst tm-ew-e/RCS-ID
+ "$Id: tm-ew-e.el,v 7.4 1995/10/18 08:54:59 morioka Exp $")
+(defconst mime/eword-encoder-version (get-version-string tm-ew-e/RCS-ID))
+
+
+;;; @ variables
+;;;
+
+(defvar mime/no-encoding-header-fields '("X-Nsubject" "Newsgroups"))
+
+(defvar mime/use-X-Nsubject nil)
+
+
;;; @ encoded-text encoder
;;;
(rfc822/lexical-analyze str)))))
+;;; @ application interfaces
+;;;
+
+(defun mime/encode-field (str)
+ (setq str (rfc822/unfolding-string str))
+ (let ((ret (string-match rfc822/field-top-regexp str)))
+ (if ret
+ (let ((field-name (substring str 0 (match-end 1)))
+ (field-body (eliminate-top-spaces
+ (substring str (match-end 0))))
+ fname)
+ (concat field-name ": "
+ (cond ((string= field-body "") "")
+ ((member (setq fname (downcase field-name))
+ '("reply-to" "from" "sender"
+ "resent-reply-to" "resent-from"
+ "resent-sender" "to" "resent-to"
+ "cc" "resent-cc"
+ "bcc" "resent-bcc" "dcc")
+ )
+ (car (tm-eword::encode-address-list
+ (+ (length field-name) 1) field-body))
+ )
+ (t
+ (catch 'tag
+ (let ((r mime/no-encoding-header-fields) fn)
+ (while r
+ (setq fn (car r))
+ (if (string= (downcase fn) fname)
+ (throw 'tag field-body)
+ )
+ (setq r (cdr r))
+ ))
+ (car (tm-eword::encode-string
+ (+ (length field-name) 1) field-body))
+ ))
+ ))
+ )
+ str)))
+
+(defun mime/exist-encoded-word-in-subject ()
+ (let ((str (rfc822/get-field-body "Subject")))
+ (if (and str (string-match mime/encoded-word-regexp str))
+ str)))
+
+(defun mime/encode-message-header ()
+ (interactive "*")
+ (save-excursion
+ (save-restriction
+ (narrow-to-region (goto-char (point-min))
+ (progn
+ (re-search-forward
+ (concat
+ "^" (regexp-quote mail-header-separator) "$")
+ nil t)
+ (match-beginning 0)
+ ))
+ (goto-char (point-min))
+ (let (beg end field)
+ (while (re-search-forward rfc822/field-top-regexp nil t)
+ (setq beg (match-beginning 0))
+ (setq end (rfc822/field-end))
+ (if (and (find-charset-region beg end)
+ (setq field
+ (mime/encode-field
+ (buffer-substring-no-properties beg end)
+ ))
+ )
+ (progn
+ (delete-region beg end)
+ (insert field)
+ ))
+ ))
+ (if mime/use-X-Nsubject
+ (let ((str (mime/exist-encoded-word-in-subject)))
+ (if str
+ (insert
+ (concat
+ "\nX-Nsubject: "
+ (mime/decode-encoded-words-string
+ (rfc822/unfolding-string str))
+ )))))
+ )))
+
+(defun mime-eword/encode-string (str &optional column mode)
+ (car (tm-eword::encode-rwl (or column 0)
+ (tm-eword::split-string str) mode))
+ )
+
+
;;; @ end
;;;
;;; Copyright (C) 1993,1994,1995 MORIOKA Tomohiko
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: tm-eword.el,v 7.9 1995/10/18 08:55:37 morioka Exp $
;;; Keywords: mail, news, MIME, RFC 1522, multilingual, encoded-word
;;;
(require 'tl-str)
(require 'tm-def)
-(autoload 'mime/decode-encoded-words-string "tm-ew-d")
-(autoload 'mime/decode-encoded-words-region "tm-ew-d" nil t)
+(autoload 'mime/encode-message-header "tm-ew-e" nil t)
(autoload 'mime/decode-message-header "tm-ew-d" nil t)
+(autoload 'mime/encode-field "tm-ew-e" nil t)
-(require 'tm-ew-e)
+(autoload 'mime-eword/decode-region "tm-ew-d" nil t)
+(autoload 'mime-eword/encode-string "tm-ew-e")
+(autoload 'mime-eword/decode-string "tm-ew-d")
-
-;;; @ version
-;;;
-
-(defconst tm-eword/RCS-ID
- "$Id: tm-eword.el,v 7.4 1995/10/11 11:53:17 morioka Exp $")
-
-(defconst tm-eword/version (get-version-string tm-eword/RCS-ID))
-
-
-;;; @ variables
-;;;
-
-(defvar mime/no-encoding-header-fields '("X-Nsubject" "Newsgroups"))
-
-(defvar mime/use-X-Nsubject nil)
+(autoload 'mime/exist-encoded-word-in-subject "tm-ew-e" nil t)
-;;; @ Application Interface
-;;;
-
-;;; @@ MIME header encoders
-;;;
-
-(defun mime/encode-field (str)
- (setq str (rfc822/unfolding-string str))
- (let ((ret (string-match rfc822/field-top-regexp str)))
- (if ret
- (let ((field-name (substring str 0 (match-end 1)))
- (field-body (eliminate-top-spaces
- (substring str (match-end 0))))
- fname)
- (concat field-name ": "
- (cond ((string= field-body "") "")
- ((member (setq fname (downcase field-name))
- '("reply-to" "from" "sender"
- "resent-reply-to" "resent-from"
- "resent-sender" "to" "resent-to"
- "cc" "resent-cc"
- "bcc" "resent-bcc" "dcc")
- )
- (car (tm-eword::encode-address-list
- (+ (length field-name) 1) field-body))
- )
- (t
- (catch 'tag
- (let ((r mime/no-encoding-header-fields) fn)
- (while r
- (setq fn (car r))
- (if (string= (downcase fn) fname)
- (throw 'tag field-body)
- )
- (setq r (cdr r))
- ))
- (car (tm-eword::encode-string
- (+ (length field-name) 1) field-body))
- ))
- ))
- )
- str)))
-
-(defun mime/exist-encoded-word-in-subject ()
- (let ((str (rfc822/get-field-body "Subject")))
- (if (and str (string-match mime/encoded-word-regexp str))
- str)))
-
-(defun mime/encode-message-header ()
- (interactive "*")
- (save-excursion
- (save-restriction
- (narrow-to-region (goto-char (point-min))
- (progn
- (re-search-forward
- (concat
- "^" (regexp-quote mail-header-separator) "$")
- nil t)
- (match-beginning 0)
- ))
- (goto-char (point-min))
- (let (beg end field)
- (while (re-search-forward rfc822/field-top-regexp nil t)
- (setq beg (match-beginning 0))
- (setq end (rfc822/field-end))
- (if (and (find-charset-region beg end)
- (setq field
- (mime/encode-field
- (buffer-substring-no-properties beg end)
- ))
- )
- (progn
- (delete-region beg end)
- (insert field)
- ))
- ))
- (if mime/use-X-Nsubject
- (let ((str (mime/exist-encoded-word-in-subject)))
- (if str
- (insert
- (concat
- "\nX-Nsubject: "
- (mime/decode-encoded-words-string
- (rfc822/unfolding-string str))
- )))))
- )))
-
-
;;; @ end
;;;
(provide 'tm-eword)
-
-(run-hooks 'tm-eword-load-hook)
;;;
;;; This file is a part of tm (Tools for MIME).
;;;
-;;; $Id: tm-partial.el,v 6.1 1995/09/26 14:50:54 morioka Exp $
+;;; $Id: tm-partial.el,v 7.0 1995/10/18 08:19:27 morioka Exp $
;;;
(require 'tm-view)
(subject-id nil)
(part-num 1)
(part-missing nil))
- (cond ((eq major-mode 'gnus-article-mode)
+ (cond ((or (eq major-mode 'gnus-article-mode)
+ (eq major-mode 'gnus-original-article-mode)
+ )
(setq subject-buf gnus-summary-buffer)
(setq target 'gnus4)
)
(set-atype 'mime/content-decoding-condition
'((type . "message/partial")
(method . mime/decode-message/grab-partials)
+ (major-mode . gnus-original-article-mode)
+ ))
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "message/partial")
+ (method . mime/decode-message/grab-partials)
(major-mode . mh-show-mode)
))
;;;
(defconst mime-viewer/RCS-ID
- "$Id: tm-view.el,v 7.15 1995/10/13 08:43:49 morioka Exp $")
+ "$Id: tm-view.el,v 7.16 1995/10/17 16:48:06 morioka Exp $")
(defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
(defconst mime/viewer-version mime-viewer/version)
(save-restriction
(narrow-to-region beg end)
(setq subj
- (mime/decode-encoded-words-string
+ (mime-eword/decode-string
(mime-viewer/get-subject params encoding)))
)
(set-buffer obuf)
(require 'vm)
(defconst tm-vm/RCS-ID
- "$Id: tm-vm.el,v 7.0 1995/10/03 05:04:35 morioka Exp $")
+ "$Id: tm-vm.el,v 7.1 1995/10/17 16:49:51 morioka Exp $")
(defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
(define-key vm-mode-map "Z" 'tm-vm/view-message)
;; (setq vm-summary-format "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c, %I\"%UA\"\n")
;; (defun vm-summary-function-A (m)
-;; (mime/decode-encoded-words-string (vm-su-subject m)))
+;; (mime-ewords/decode-string (vm-su-subject m)))
;;; @ functions