From 536d5c7b4ffecc9615ac819cd71581add2d1acfd Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 29 Jun 1998 14:09:36 +0000 Subject: [PATCH] Merge remi-1_8. --- ChangeLog | 52 +++++++++++++++++++++++++++ Makefile | 2 +- VERSION | 111 ++++++++++++++++++++++++++++++---------------------------- mime-pgp.el | 22 ++++++------ mime-play.el | 51 +++++++-------------------- mime-view.el | 89 ++++++++++++++++++++++++++-------------------- semi-def.el | 2 +- 7 files changed, 186 insertions(+), 143 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bb9fb1..b796763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,55 @@ +1998-06-29 MORIOKA Tomohiko + + * mime-play.el (mime-save-content): Use + `mime-write-entity-content'. + +1998-06-29 MORIOKA Tomohiko + + * mime-view.el: + - Abolish local variable `mime-raw-representation-type'. + - Abolish function `mime-entity-representation-type'. + + * mime-pgp.el (mime-view-application/pgp): Use + `mime-entity-cooked-p'. + + * mime-play.el (mime-view-message/rfc822): Use + `mime-entity-cooked-p'. + +1998-06-28 MORIOKA Tomohiko + + * mime-play.el: Abolish function `mime-raw-write-region'. + + * mime-play.el (mime-store-message/partial-piece): Use + `mime-write-entity-body'. + + * mime-pgp.el (mime-verify-application/pgp-signature): Use + `mime-write-entity'. + +1998-06-28 MORIOKA Tomohiko + + * mime-pgp.el (mime-view-application/pgp): Specify + representation-type by argument of `mime-view-buffer'. + +1998-06-28 MORIOKA Tomohiko + + * mime-play.el (mime-view-message/rfc822): New implementation. + + * mime-view.el (mime-display-message): Try use window of mother + buffer to display mime-preview-buffer. + +1998-06-28 MORIOKA Tomohiko + + * mime-view.el: Abolish `mime-entity-cooked-p'; use + `mime-entity-cooked-p' of FLIM. + (mime-view-buffer): New optional argument `representation-type'; + use `mime-open-entity'. + (mime-view-mode): New implementation. + + +1998-06-28 MORIOKA Tomohiko + + * REMI: Version 1.8.0 (Ecch-Dþ-Kokubu)-A released. + 1998-06-26 MORIOKA Tomohiko * README.en (Required environment): Modify for FLIM 1.7.0. diff --git a/Makefile b/Makefile index eb229ce..8f35fc9 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # PACKAGE = semi -VERSION = 1.8.0 +VERSION = 1.8.1 SHELL = /bin/sh MAKE = make diff --git a/VERSION b/VERSION index 86ec7ed..05a1f51 100644 --- a/VERSION +++ b/VERSION @@ -59,8 +59,10 @@ 1.7.0 Mizuhashi $(B?e66(B 1.7.1 Higashi-Toyama $(BElIY;3(B 1.8.0 Toyama $(BIY;3(B ; = JR $(B9b;3K\@~!"IY;39A@~(B -: : : -------- Takaoka $(B9b2,(B ; = JR $(BI98+@~!">kC<@~(B +1.8.1 Kureha $(B8b1)(B +----- Kosugi $(B>.?y(B +----- Ecch-Dþ-Daimon-A $(B1[CfBgLg(B +----- Takaoka $(B9b2,(B ; = JR $(BI98+@~!">kC<@~(B : : : ------- Higashi-Kanazawa $(BEl6bBt(B ------- Kanazawa $(B6bBt(B ; <=> $(BKLN&E4F;(B $(BKLE46bBt(B @@ -87,61 +89,62 @@ ;; East Japan Railway $(BElF|K\N95RE4F;(B http://www.jreast.co.jp/ ;; T-Dòkaidò-A Line $(BEl3$F;K\@~(B ;;------------------------------------------------------------------------- -1.2.0 T-Dòkyò-A $(BEl5~(B -1.2.1 Shinbashi $(B?766(B ; = JR $(B;3 $(B>.ED5^EEE4(B $(B9>%NEg@~!"9>%NEgEEE4(B -1.4.1 Tsujid-Dò-A $(@DT$(BF2(B ; $(B!J!V$(@DT$(B!W(B= J90@B-4454:128b$(B!K(B -1.4.2 Chigasaki $(B3}%v:j(B ; = JR $(BAjLO@~(B -1.4.3 Hiratsuka $(BJ?DM(B -1.4.4 -DÒiso-A $(BBg0k(B -1.4.5 Ninomiya $(BFs5\(B -1.4.6 K-Dòzu-A $(B9qI\DE(B ; = JR $(B8fEB>l@~(B -1.5.0 Kamonomiya $(B3{5\(B -1.5.1 Odawara $(B>.ED86(B ; <=> $(B>.ED5^!"H":,EP;3E4F;!"0KF&H":,E4F;(B -1.5.2 Hayakawa $(BAa@n(B -1.5.3 Nebukawa $(B:,I\@n(B -1.5.4 Manazuru $(B??Da(B -1.6.0 Yugawara $(BEr2O86(B -1.7.0 Atami $(BG.3$(B ; = JR $(B0KEl@~(B +1.2.0 T-Dòkyò-A $(BEl5~(B +1.2.1 Shinbashi $(B?766(B ; = JR $(B;3 $(B>.ED5^EEE4(B $(B9>%NEg@~!"9>%NEgEEE4(B +1.4.1 Tsujid-Dò-A $(@DT$(BF2(B ; $(B!J!V$(@DT$(B!W(B= J90@B-4454:128b$(B!K(B +1.4.2 Chigasaki $(B3}%v:j(B ; = JR $(BAjLO@~(B +1.4.3 Hiratsuka $(BJ?DM(B +1.4.4 -DÒiso-A $(BBg0k(B +1.4.5 Ninomiya $(BFs5\(B +1.4.6 K-Dòzu-A $(B9qI\DE(B ; = JR $(B8fEB>l@~(B +1.5.0 Kamonomiya $(B3{5\(B +1.5.1 Odawara $(B>.ED86(B ; <=> $(B>.ED5^!"H":,EP;3E4F;!"(B + ; $(B0KF&H":,E4F;(B +1.5.2 Hayakawa $(BAa@n(B +1.5.3 Nebukawa $(B:,I\@n(B +1.5.4 Manazuru $(B??Da(B +1.6.0 Yugawara $(BEr2O86(B +1.7.0 Atami $(BG.3$(B ; = JR $(B0KEl@~(B ;;------------------------------------------------------------------------- ;; Central Japan Railway $(BEl3$N95RE4F;(B ;;------------------------------------------------------------------------- -1.7.1 Kan'nami $(BH!Fn(B -1.8.0 Mishima $(B;0Eg(B ; = $(B0KF&H":,E4F;(B ------ Numazu $(B>BDE(B ; = JR $(B8fEB>l@~(B ------ Katahama $(BJRIM(B ------ Hara $(B86(B +1.7.1 Kan'nami $(BH!Fn(B +1.8.0 Mishima $(B;0Eg(B ; = $(B0KF&H":,E4F;(B +----- Numazu $(B>BDE(B ; = JR $(B8fEB>l@~(B +----- Katahama $(BJRIM(B +----- Hara $(B86(B ----- Higashi-Tagonoura $(BElED;R%N1:(B ------ Yoshiwara $(B5H86(B ; = $(B3YFnE4F;(B ------ Fuji $(BIY;N(B ; = JR $(B?H1d@~(B -: : : ------ Kanayama $(B6b;3(B ; =$(B!J(BJR $(BCf1{K\@~!K(B ------ Ot-Dòbashi-A $(BHxF,66(B ------ Nagoya $(BL>8E20(B ; = JR $(B4X@>K\@~!J!&Cf1{K\@~!K(B -: : : ------ Gifu $(B4tIl(B ; = JR $(B9b;3K\@~(B -: : : ------ Samegai $(B@C%v0f(B +----- Yoshiwara $(B5H86(B ; = $(B3YFnE4F;(B +----- Fuji $(BIY;N(B ; = JR $(B?H1d@~(B +: : : +----- Kanayama $(B6b;3(B ; =$(B!J(BJR $(BCf1{K\@~!K(B +----- Ot-Dòbashi-A $(BHxF,66(B +----- Nagoya $(BL>8E20(B ; = JR $(B4X@>K\@~!J!&Cf1{K\@~!K(B +: : : +----- Gifu $(B4tIl(B ; = JR $(B9b;3K\@~(B +: : : +----- Samegai $(B@C%v0f(B ;;------------------------------------------------------------------------- ;; West Japan Railway $(B@>F|K\N95RE4F;(B http://www.westjr.co.jp/ ;;------------------------------------------------------------------------- ------ Maibara $(BJF86(B ; = JR $(BKLN&K\@~(B -: : : ------ Kusatsu $(BApDE(B ; = JR $(BApDE@~(B -: : : ------ Yamashina $(B;32J(B ; = JR $(B8P@>@~(B ------ Ky-Dòto-A $(B5~ET(B ; = JR $(BF`NI@~!&;31"K\@~(B - ; <=> $(B6aE4(B $(B5~ET@~!"5~ET;T8rDL6I(B $(B1(4]@~(B -: : : ------ -DÒsaka-A $(BBg:e(B ; = JR $(BBg:e4D>u@~(B <=> JR $(BEl@>@~(B $(BKL?7CO(B - ; <=> $(BBg:e;T8rDL6I!":e?@!":e5^(B $(BG_ED(B -: : : ------ K-Dòbe-A $(B?@8M(B ; = JR $(B;3M[K\@~(B +----- Maibara $(BJF86(B ; = JR $(BKLN&K\@~(B +: : : +----- Kusatsu $(BApDE(B ; = JR $(BApDE@~(B +: : : +----- Yamashina $(B;32J(B ; = JR $(B8P@>@~(B +----- Ky-Dòto-A $(B5~ET(B ; = JR $(BF`NI@~!&;31"K\@~(B + ; <=> $(B6aE4(B $(B5~ET@~!"5~ET;T8rDL6I(B $(B1(4]@~(B +: : : +----- -DÒsaka-A $(BBg:e(B ; = JR $(BBg:e4D>u@~(B <=> JR $(BEl@>@~(B $(BKL?7CO(B + ; <=> $(BBg:e;T8rDL6I!":e?@!":e5^(B $(BG_ED(B +: : : +----- K-Dòbe-A $(B?@8M(B ; = JR $(B;3M[K\@~(B [REMI version names] @@ -153,11 +156,11 @@ 1.4.0 Himi $(BI98+(B 1.5.0 Shimao $(BEgHx(B 1.6.0 Amaharashi $(B1+@2(B -1.7.0 Ecch-Dþ-Kokubu-A $(B1[Cf9qJ,(B -------- Fushiki $(BIzLZ(B +1.8.0 Ecch-Dþ-Kokubu-A $(B1[Cf9qJ,(B +1.8.1 Fushiki $(BIzLZ(B ; <=> $(B%&%i%8%*%9%C%H%C%/9RO)(B ------- Noumachi $(BG=D.(B ------- Ecch-Dþ-Nakagawa-A $(B1[CfCf@n(B - (Takaoka) ($(B9b2,(B) ; = JR $(BKLN&K\@~!">kC<@~(B + (Takaoka) ($(B9b2,(B) ; = JR $(BKLN&K\@~!">kC<@~(B [etc.] @@ -169,4 +172,4 @@ ------- (-DÒmi-Shiotsu)-A ($(B6a9>1vDE(B) ; = JR $(BKLN&K\@~(B : : : ------- Nishi--DÒtsu-A $(B@>BgDE(B - (Yamashina) ($(B;32J(B) ; = JR $(BEl3$F;K\@~(B + (Yamashina) ($(B;32J(B) ; = JR $(BEl3$F;K\@~(B diff --git a/mime-pgp.el b/mime-pgp.el index fe2e1f2..67fbb6e 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -63,18 +63,17 @@ ;;; It is based on draft-kazu-pgp-mime-00.txt (PGP-kazu). (defun mime-view-application/pgp (entity situation) - (let* ((start (mime-entity-point-min entity)) - (end (mime-entity-point-max entity)) - (entity-number (mime-raw-point-to-entity-number start)) - (p-win (or (get-buffer-window mime-preview-buffer) + (let* ((p-win (or (get-buffer-window mime-preview-buffer) (get-largest-window))) - (new-name (format "%s-%s" (buffer-name) entity-number)) + (new-name + (format "%s-%s" (buffer-name) (mime-entity-number entity))) (the-buf (current-buffer)) (mother mime-preview-buffer) representation-type) (set-buffer (get-buffer-create new-name)) (erase-buffer) - (insert-buffer-substring the-buf start end) + (insert-buffer-substring + the-buf (mime-entity-point-min entity) (mime-entity-point-max entity)) (cond ((progn (goto-char (point-min)) (re-search-forward "^-+BEGIN PGP SIGNED MESSAGE-+$" nil t)) @@ -93,7 +92,8 @@ (while (re-search-forward "^- -" nil t) (replace-match "-") ) - (setq representation-type (mime-entity-representation-type entity)) + (setq representation-type (if (mime-entity-cooked-p entity) + 'cooked)) ) ((progn (goto-char (point-min)) @@ -107,8 +107,8 @@ (setq representation-type 'binary) )) (setq major-mode 'mime-show-message-mode) - (setq mime-raw-representation-type representation-type) - (save-window-excursion (mime-view-mode mother)) + (save-window-excursion (mime-view-buffer nil nil mother + nil representation-type)) (set-window-buffer p-win mime-preview-buffer) )) @@ -170,9 +170,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (orig-file (make-temp-name basename)) (sig-file (concat orig-file ".sig")) ) - (mime-raw-write-region (mime-entity-point-min orig-entity) - (mime-entity-point-max orig-entity) - orig-file) + (mime-write-entity orig-entity orig-file) (save-excursion (mime-show-echo-buffer)) (mime-write-decoded-region (save-excursion (goto-char start) diff --git a/mime-play.el b/mime-play.el index f9834bd..344b9da 100644 --- a/mime-play.el +++ b/mime-play.el @@ -313,7 +313,6 @@ window.") (defun mime-save-content (entity situation) (let* ((name (mime-entity-safe-filename entity)) - (encoding (or (mime-entity-encoding entity) "7bit")) (filename (if (and name (not (string-equal name ""))) (expand-file-name name (save-window-excursion @@ -332,9 +331,7 @@ window.") (if (file-exists-p filename) (or (yes-or-no-p (format "File %s exists. Save anyway? " filename)) (error ""))) - (mime-write-decoded-region (mime-entity-body-start entity) - (mime-entity-body-end entity) - filename encoding) + (mime-write-entity-content entity filename) )) @@ -403,47 +400,26 @@ It is registered to variable `mime-preview-quitting-method-alist'." (pop-to-buffer mother) )) -(defun mime-view-message/rfc822 (entity cal) - (let* ((beg (mime-entity-point-min entity)) - (end (mime-entity-point-max entity)) - (cnum (mime-raw-point-to-entity-number beg)) - (new-name (format "%s-%s" (buffer-name) cnum)) +(defun mime-view-message/rfc822 (entity situation) + (let* ((new-name + (format "%s-%s" (buffer-name) (mime-entity-number entity))) (mother mime-preview-buffer) - (representation-type (mime-entity-representation-type entity)) - str) - (setq str (buffer-substring beg end)) - (switch-to-buffer new-name) + (children (car (mime-entity-children entity)))) + (set-buffer (get-buffer-create new-name)) (erase-buffer) - (insert str) - (goto-char (point-min)) - (if (re-search-forward "^\n" nil t) - (delete-region (point-min) (match-end 0)) - ) + (insert-buffer-substring (mime-entity-buffer children) + (mime-entity-point-min children) + (mime-entity-point-max children)) + (setq mime-message-structure children) (setq major-mode 'mime-show-message-mode) - (setq mime-raw-representation-type representation-type) - (mime-view-mode mother) + (mime-view-buffer (current-buffer) nil mother + nil (if (mime-entity-cooked-p entity) 'cooked)) )) ;;; @ message/partial ;;; -(defun mime-raw-write-region (start end filename) - "Write current region into specified file. -When called from a program, takes three arguments: -START, END and FILENAME. START and END are buffer positions. -It refer `mime-raw-representation-type' or `major-mode -mime-raw-representation-type-alist'. If it is `binary', region is -saved as binary. Otherwise the region is saved by `write-region'." - (let ((presentation-type - (or mime-raw-representation-type - (cdr (or (assq major-mode mime-raw-representation-type-alist) - (assq t mime-raw-representation-type-alist)))))) - (if (eq presentation-type 'binary) - (write-region-as-binary start end filename) - (write-region start end filename) - ))) - (defun mime-store-message/partial-piece (entity cal) (goto-char (mime-entity-point-min entity)) (let* ((root-dir @@ -483,8 +459,7 @@ saved as binary. Otherwise the region is saved by `write-region'." (select-window pwin) ) (setq file (concat root-dir "/" number)) - (mime-raw-write-region (mime-entity-body-start entity) - (mime-entity-body-end entity) file) + (mime-write-entity-body entity file) (let ((total-file (concat root-dir "/CT"))) (setq total (if total diff --git a/mime-view.el b/mime-view.el index 1e0fe3f..3322e32 100644 --- a/mime-view.el +++ b/mime-view.el @@ -70,16 +70,6 @@ (make-variable-buffer-local 'mime-preview-buffer) -(defvar mime-raw-representation-type nil - "Representation-type of mime-raw-buffer. -It must be nil, `binary' or `cooked'. -If it is nil, `mime-raw-representation-type-alist' is used as default -value. -Notice that this variable is usually used as buffer local variable in -raw-buffer.") - -(make-variable-buffer-local 'mime-raw-representation-type) - (defvar mime-raw-representation-type-alist '((mime-show-message-mode . binary) (mime-temp-message-mode . binary) @@ -88,9 +78,7 @@ raw-buffer.") "Alist of major-mode vs. representation-type of mime-raw-buffer. Each element looks like (SYMBOL . REPRESENTATION-TYPE). SYMBOL is major-mode or t. t means default. REPRESENTATION-TYPE must be -`binary' or `cooked'. -This value is overridden by buffer local variable -`mime-raw-representation-type' if it is not nil.") +`binary' or `cooked'.") (defun mime-raw-find-entity-from-point (point &optional message-info) @@ -150,15 +138,6 @@ mother-buffer." ;;; @ entity information ;;; -(defsubst mime-entity-representation-type (entity) - (with-current-buffer (mime-entity-buffer entity) - (or mime-raw-representation-type - (cdr (or (assq major-mode mime-raw-representation-type-alist) - (assq t mime-raw-representation-type-alist)))))) - -(defsubst mime-entity-cooked-p (entity) - (eq (mime-entity-representation-type entity) 'cooked)) - (defun mime-entity-situation (entity) "Return situation of ENTITY." (append (or (mime-entity-content-type entity) @@ -913,15 +892,41 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (let ((r-win (get-buffer-window raw-buffer))) (if r-win (set-window-buffer r-win preview-buffer) - (switch-to-buffer preview-buffer) - ))) + (let ((m-win (and mother (get-buffer-window mother)))) + (if m-win + (set-window-buffer m-win preview-buffer) + (switch-to-buffer preview-buffer) + ))))) ))) (defun mime-view-buffer (&optional raw-buffer preview-buffer mother - default-keymap-or-function) + default-keymap-or-function + representation-type) + "View RAW-BUFFER in MIME-View mode. +Optional argument PREVIEW-BUFFER is either nil or a name of preview +buffer. +Optional argument DEFAULT-KEYMAP-OR-FUNCTION is nil, keymap or +function. If it is a keymap, keymap of MIME-View mode will be added +to it. If it is a function, it will be bound as default binding of +keymap of MIME-View mode. +Optional argument REPRESENTATION-TYPE is representation-type of +message. It must be nil, `binary' or `cooked'. If it is nil, +`binary' is used as default." (interactive) + (or raw-buffer + (setq raw-buffer (current-buffer))) + (or representation-type + (setq representation-type + (save-excursion + (set-buffer raw-buffer) + (cdr (or (assq major-mode mime-raw-representation-type-alist) + (assq t mime-raw-representation-type-alist))) + ))) + (if (eq representation-type 'binary) + (setq representation-type 'buffer) + ) (mime-display-message - (mime-parse-buffer raw-buffer) + (mime-open-entity representation-type raw-buffer) preview-buffer mother default-keymap-or-function)) (defun mime-view-mode (&optional mother ctl encoding @@ -950,17 +955,27 @@ button-2 Move to point under the mouse cursor and decode current content as `play mode' " (interactive) - (let ((message - (save-excursion - (if raw-buffer (set-buffer raw-buffer)) - (or mime-view-redisplay - (setq mime-message-structure (mime-parse-message ctl))) - ))) - (or (mime-entity-encoding message) - (mime-entity-set-encoding-internal message encoding)) - (mime-display-message message preview-buffer - mother default-keymap-or-function) - )) + (unless mime-view-redisplay + (save-excursion + (if raw-buffer (set-buffer raw-buffer)) + (let ((type + (cdr + (or (assq major-mode mime-raw-representation-type-alist) + (assq t mime-raw-representation-type-alist))))) + (if (eq type 'binary) + (setq type 'buffer) + ) + (setq mime-message-structure (mime-open-entity type raw-buffer)) + (or (mime-entity-content-type mime-message-structure) + (mime-entity-set-content-type-internal + mime-message-structure ctl)) + ) + (or (mime-entity-encoding mime-message-structure) + (mime-entity-set-encoding-internal mime-message-structure encoding)) + )) + (mime-display-message mime-message-structure preview-buffer + mother default-keymap-or-function) + ) ;;; @@ playing diff --git a/semi-def.el b/semi-def.el index 38508b0..ce93512 100644 --- a/semi-def.el +++ b/semi-def.el @@ -30,7 +30,7 @@ (require 'custom) -(defconst mime-user-interface-version '("SEMI" "Toyama" 1 8 0) +(defconst mime-user-interface-version '("SEMI" "Kureha" 1 8 1) "Implementation name, version name and numbers of MIME-kernel package.") (autoload 'mule-caesar-region "mule-caesar" -- 1.7.10.4