From d1f3df186339f3d2b91050fb1f079590c8fc30d3 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 18 Oct 1999 00:00:37 +0000 Subject: [PATCH] Merge semi-1_13_7. --- ChangeLog | 498 ++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 18 +- NEWS | 76 +++++++- README.en | 10 +- README.ja | 258 -------------------------- SEMI-CFG | 28 +-- SEMI-MK | 13 +- TODO | 43 +---- VERSION | 47 ++++- ftp.in | 10 +- mime-bbdb.el | 6 +- mime-edit.el | 88 +++++---- mime-partial.el | 6 +- mime-pgp.el | 33 ++-- mime-play.el | 352 ++++++++++++++++++----------------- mime-view.el | 544 +++++++++++++++++++++++++++++++++++-------------------- mime-w3.el | 24 ++- semi-def.el | 8 +- 18 files changed, 1274 insertions(+), 788 deletions(-) delete mode 100644 README.ja diff --git a/ChangeLog b/ChangeLog index d9b2a51..7591d3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,501 @@ +1999-10-16 MORIOKA Tomohiko + + * SEMI: Version 1.13.7 (Awazu) released. + +1999-10-06 Yoshiki Hayashi + + * mime-view.el (mime-preview-move-to-upper): Scroll + according to mime-preview-move-scroll. + +1999-10-05 Yoshiki Hayashi + + * mime-view.el (mime-preview-scroll-down-entity, + mime-preview-scroll-up-entity): Recenter when moving to + a next entity. + (mime-preview-move-scroll): New variable. + (mime-preview-move-to-previous, mime-preview-move-to-next): + Recenter according to the variable mime-preview-move-scroll. + +1999-10-04 Katsumi Yamaoka + + * mime-view.el (mime-preview-move-to-next): Attempt to go to the + next page if the return value of `next-single-property-change' is + greater than `point-max'. + (mime-preview-move-to-previous): Don't move backward at the + beginning of the buffer; attempt to go to the previous page if the + return value of `previous-single-property-change' is less than + `point-min'. + +1999-09-29 MORIOKA Tomohiko + + * mime-view.el (mime-display-multipart/mixed): Share cell of + `major-mode'. + (mime-display-multipart/alternative): Likewise. + (mime-display-entity): Refer `major-mode' value of a situation + instead of buffer-local-variable `major-mode'. + +1999-09-29 MORIOKA Tomohiko + + * mime-play.el (mime-preview-play-current-entity): Use + text-property `mime-view-situation' as the initial value of + acting-situation to add major-mode. + +1999-09-29 MORIOKA Tomohiko + + * mime-edit.el (mime-content-types): Delete text/x-rot13-47-48 in + default definition. [cf. , ] + +1999-09-27 Katsumi Yamaoka + + * mime-edit.el (mime-edit-user-agent-value): Include + `emacs-patch-level'. It exists in XEmacs 21.1.1 or later. + +1999-09-20 Yoshiki Hayashi + + * mime-view.el (mime-preview-scroll-up-entitiy, + mime-preview-scroll-down-entity): Use scroll-up and scroll-down + instead of forward-line. + (mime-preview-next-line-entity, + mime-preview-previous-line-entity): Add optional argument LINES + and scroll LINES lines if specified. Add doc-string. + + +1999-09-13 MORIOKA Tomohiko + + * SEMI: Version 1.13.6 (Komatsu) released. + +1999-08-30 MORIOKA Tomohiko + + * mime-edit.el (mime-edit-mime-version-field-for-message/partial): + Encode `mime-edit-version'. + +1999-08-28 MORIOKA Tomohiko + + * mime-play.el (mime-store-message/partial-piece): Use + `directory-files' to check number of pieces. + +1999-08-26 MORIOKA Tomohiko + + * mime-play.el (mime-store-message/partial-piece): Don't refer + `mime-preview-buffer'. + +1999-08-25 Katsumi Yamaoka + + * SEMI-CFG: Use `if' instead of `when'. + + +1999-08-18 MORIOKA Tomohiko + + * REMI: Version 1.13.2 (-DÒike-Ikoinomori)-A released. + +1999-08-17 Katsumi Yamaoka + + * mime-view.el (mime-preview-original-major-mode): Modify the way + of checking for the end of the buffer. + +1999-08-17 Katsumi Yamaoka + + * mime-view.el (mime-preview-original-major-mode): Don't use + `get-text-property' at the end of the buffer. + +1999-08-02 MORIOKA Tomohiko + + * mime-view.el (mime-preview-follow-current-entity): Don't use + `mime-entity-buffer'. + +1999-05-17 KOSEKI Yoshinori + + * mime-pgp.el (mime-verify-application/pgp-signature): Specify the + name of `sig-file' explicitly for `mime-pgp-check-signature'. + (mime-pgp-check-signature): Accept new arg `sig-file' and feed its + value to the verify command. + +1999-07-29 MORIOKA Tomohiko + + * mime-play.el (mime-play-entity): Get media-type from situation + instead of entity; display prompt and call `mime-save-content' if + method is not found. + (mime-detect-content): Call `mime-play-entity' even if media-type + specification is not found in `mime-magic-type-alist'. + +1999-07-28 MORIOKA Tomohiko + + * mime-view.el (mime-view-entity-title): Use + `mime-entity-read-field' instead of `mime-read-field'. + (mime-display-message): Use `major-mode' of + mime-entity-header-buffer as the default value of + original-major-mode. + + * mime-play.el (mime-entity-safe-filename): Use + `mime-entity-read-field' instead of `mime-read-field'. + (mime-view-message/rfc822): New implementation. + + * mime-pgp.el (mime-add-application/pgp-keys): Use + `mime-entity-number' instead of `mime-raw-point-to-entity-number'. + + * mime-partial.el + (mime-combine-message/partial-pieces-automatically): Use + `mime-entity-read-field' instead of `mime-read-field'. + + * mime-bbdb.el (mime-bbdb/update-record): Use + `mime-entity-read-field' instead of `mime-read-field'; use + `mime-entity-fetch-field' instead of `mime-fetch-field'. + +1999-07-28 MORIOKA Tomohiko + + * mime-view.el (mime-raw-find-entity-from-point): Deleted. + (mime-raw-buffer): Deleted. + (mime-preview-original-major-mode): Add new optional argument + `point'; refer text-property `mime-view-situation' instead of + using `mime-entity-buffer'. + (mime-raw-point-to-entity-node-id): Deleted. + (mime-raw-point-to-entity-number): Deleted. + (mime-raw-flatten-message-info): Deleted. + (mime-display-entity): Add text-property `mime-view-situation' to + each entity. + + +1999-07-27 MORIOKA Tomohiko + + * SEMI: Version 1.13.5 (Meih-Dò)-A released. + +1999-07-27 MORIOKA Tomohiko + + * NEWS (Don't expect raw-buffer): New subsection. + (Now acting-method must not expect to run in raw-buffer): Changed + as a subsubsection of subsection `Don't expect raw-buffer'. + (Don't refer variable `mime-raw-buffer'): New subsubsection. + (Don't refer variable `mime-preview-buffer'): New subsubsection. + + * NEWS (Requires FLIM 1.13 API): New subsection. + +1999-07-23 MORIOKA Tomohiko + + * README.en (Required environment): Change required FLIM to + 1.13.1; change location of APEL and FLIM. + + +1999-07-22 MORIOKA Tomohiko + + * REMI: Version 1.13.1 (Kubiki) released. + +1999-07-22 MORIOKA Tomohiko + + * mime-play.el + (mime-preview-quitting-method-for-mime-show-message-mode): Don't + refer `mime-raw-buffer'. + +1999-07-21 MORIOKA Tomohiko + + * mime-play.el (mime-store-message/partial-piece): Don't refer + `mime-preview-buffer'. + + +1999-07-21 MORIOKA Tomohiko + + * REMI: Version 1.13.0 (Saigata) released. + +1999-07-21 MORIOKA Tomohiko + + * Makefile (EXEC_PREFIX): Deleted. + (elc): Change command-line interface to delete `EXEC_PREFIX'. + (install-elc): Likewise. + + * SEMI-MK (config-semi): Change command-line interface to delete + `EXEC_PREFIX'. + + * SEMI-CFG (EXEC_PREFIX): Deleted. + +1999-07-07 Daiki Ueno + + * mime-edit.el (mime-edit-quitting-method): Don't refer + `mime-raw-buffer'. + + * mime-view.el (mime-preview-follow-current-entity): Don't refer + `mime-raw-buffer'. + +1999-06-17 MORIOKA Tomohiko + + * mime-edit.el (mime-edit-user-agent-value): Modify for XEmacs + UTF-2000-MULE. + +1999-06-04 MORIOKA Tomohiko + + * mime-edit.el (mime-edit-user-agent-value): Modify code to get + version number of XEmacs. [cf. ] + +1999-05-22 MORIOKA Tomohiko + + * mime-view.el (mime-entity-situation): Don't refer `major-mode' + of a mime-entity-buffer. + (mime-display-multipart/mixed): Add `major-mode' of SITUATION to + default-situation of children. + (mime-display-multipart/alternative): Likewise. + (mime-display-entity): Don't refer `raw-buffer'; use + `mime-goto-header-start-point'. + (mime-display-message): Add new optional argument + `original-major-mode'; don't refer `raw-buffer'; use + `mime-entity-name' to make name of `preview-buffer'; don't set up + `mime-raw-buffer' of `preview-buffer'; use `original-major-mode' + as value of `major-mode' field of default-situation; don't pop up + `preview-buffer' in suitable window; return `preview-buffer'. + (mime-view-buffer): Pop up `preview-buffer' in suitable window. + +1999-05-31 Keiichi Suzuki + + * mime-play.el (mime-show-echo-buffer): Bind `buffer-read-only' to + nil, while insert messages. + +1999-05-28 MORIOKA Tomohiko + + * README.en (Required environment): Require APEL 9.20. + +1999-05-27 MORIOKA Tomohiko + + * mime-play.el (mime-play-entity): Enter to the calist-package + `mime-view' before call `ctree-find-calist'. + + * mime-view.el (mime-view): New calist-package. + (mime-display-entity): Enter to the calist-package `mime-view' + before call `ctree-match-calist'. + +1999-05-23 MORIOKA Tomohiko + + * mime-edit.el (mime-edit-mime-version-value): Don't use + `eval-when-compile' to avoid problem with XEmacs-MULE. + (mime-edit-mime-version-field-for-message/partial): Likewise. + +1999-05-20 MORIOKA Tomohiko + + * NEWS (Text property `mime-view-entity-{header|body}'): New + subsection. + (Behavior change about `mime-display-header-hook'): Likewise. + + * mime-view.el (mime-display-entity): Don't move to (point-max) + before run `mime-display-header-hook)'. + +1999-05-19 MORIOKA Tomohiko + + * mime-view.el (mime-display-entity): Put text-property + `mime-view-entity-header' and `mime-view-entity-body' to header + and body; run `mime-display-header-hook' before insert "\n". + (mime-preview-follow-current-entity): Use text-property + `mime-view-entity-header'. + + +1999-05-12 MORIOKA Tomohiko + + * SEMI: Version 1.13.4 (Terai) released. + +1999-04-06 Shuhei KOBAYASHI + + * mime-edit.el (mime-delete-field): Use `std11-field-end'. + +1999-03-30 Keiichi Suzuki + + * mime-edit.el (mime-edit-decode-single-part-in-buffer): Normalize + EOL code in MIME encoded text part. + +1999-03-27 MORIOKA Tomohiko + + * mime-view.el (mime-preview-follow-current-entity): Don't copy + header if current entity is root. + +1999-03-11 MORIOKA Tomohiko + + * mime-edit.el (mime-charset-type-list): Add `tis-620'. + + +1999-02-28 MORIOKA Tomohiko + + * SEMI: Version 1.13.3 (Komaiko) released. + +1999-02-26 Katsumi Yamaoka + + * SEMI-MK (install-semi-package): Install mime-setup.el(c). + (compile-semi-package): Compile mime-setup.el as well. + +1999-02-08 MORIOKA Tomohiko + + * mime-edit.el (mime-content-types): Add definition of + application/vnd.ms-powerpoint for myself :-P + (mime-file-types): Add setting of *.ppt for + application/vnd.ms-powerpoint. + +1999-02-08 MORIOKA Tomohiko + + * mime-partial.el + (mime-combine-message/partial-pieces-automatically): Call + `mime-store-message/partial-piece' in the buffer when it is + called. + + * mime-play.el (mime-store-message/partial-piece): Don't move to + point-min. + + * mime-play.el (mime-store-message/partial-piece): Don't expect + called in raw-buffer. + + +1999-01-27 MORIOKA Tomohiko + + * SEMI: Version 1.13.2 (Mikawa) released. + +1999-01-26 Katsumi Yamaoka + + * README.en: Notice that 1.12.5 or later of FLIM is required. + +1999-01-26 MORIOKA Tomohiko + + * mime-play.el (mime-preview-play-current-entity): Add autoload + cookie. + (mime-play-entity): Likewise. + + * mime-view.el (mime-display-message): Add autoload cookie; add + DOC-string. + (mime-view-buffer): Add autoload cookie. + +1999-01-26 MORIOKA Tomohiko + + * mime-play.el (mime-reduce-acting-situation-examples): New + implementation. + +1999-01-26 MORIOKA Tomohiko + + * mime-play.el (mime-view-caesar): Select window which displays + current-buffer if it is not selected . + +1999-01-26 Katsumi Yamaoka + + * mime-edit.el (mime-edit-decode-single-part-in-buffer): Limit the + search bound for the end of "Content-Transfer-Encoding" field. + +1999-01-26 MORIOKA Tomohiko + + * mime-play.el (mime-view-caesar): New implementation. + +1999-01-26 MORIOKA Tomohiko + + * mime-play.el (mime-view-caesar): Don't expect called in + raw-buffer; use `mime-insert-entity'. + +1999-01-25 MORIOKA Tomohiko + + * mime-w3.el (mime-preview-text/html): Display err if error occurs + in `w3-region'. + + * mime-w3.el (mime-preview-text/html): Guard from error of + `w3-region'. + + +1999-01-24 MORIOKA Tomohiko + + * SEMI: Version 1.13.1 (Kaga-Kasama) released. + +1999-01-24 MORIOKA Tomohiko + + * TODO (Don't expect raw-buffer): New item. + (lazy generating of situations from mime-entity information): New + item. + + * TODO (Don't use filter-model): finished. + + * TODO (multipart/related support): virtually finished. + +1999-01-24 MORIOKA Tomohiko + + * Delete README.ja until it is fixed. + + * mime-w3.el (url-cid): Use `mime-insert-entity-content'. + + * README.ja, README.en (Required environment): Require FLIM + 1.12.4. + + * mime-w3.el (mime-w3-message-structure): New variable. + (mime-preview-text/html): Set up `mime-w3-message-structure'. + (url-cid): New function; set up as registered-protocol of url. + +1999-01-23 MORIOKA Tomohiko + + * README.ja: Modify title. + + * README.ja: Add notice about translation. + + * README.ja, README.en (Required environment): Require FLIM + 1.12.3; delete description about enriched.el because anything + older than Emacs 19.28 are not supported. + + * mime-pgp.el (mime-view-application/pgp): Don't expect called in + raw-buffer; use `mime-insert-entity'. + + * mime-play.el (mime-view-message/rfc822): Use + `mime-insert-entity'. + +1999-01-22 MORIOKA Tomohiko + + * NEWS (Function `mime-play-entity'): Sync with latest + specification. + + * mime-pgp.el (mime-verify-multipart/signed): Modify for interface + change of `mime-play-entity'. + + * mime-play.el (mime-preview-play-current-entity): Modify for + interface change of `mime-play-entity'. + (mime-play-entity): Change interface; abolish optional arguments + `mode' and `ignore-example'. + (mime-detect-content): Modify for interface change of + `mime-play-entity'. + + * mime-view.el (mime-entity-situation): Add new optional argument + `situation'; it is preferred to attributes of entity. + +1999-01-22 MORIOKA Tomohiko + + * mime-view.el (mime-view-version): Don't use `eval-when-compile' + to avoid to break product-code-name. + + * mime-edit.el (mime-edit-version): Don't use `eval-when-compile' + to avoid to break product-code-name. + + +1999-01-21 MORIOKA Tomohiko + + * SEMI: Version 1.13.0 (Matt-Dò)-A released. + +1999-01-21 MORIOKA Tomohiko + + * mime-play.el (mime-view-message/rfc822): Don't expect called in + raw-buffer. + +1999-01-21 MORIOKA Tomohiko + + * NEWS (Function `mime-play-entity'): Add description about + interface change of `mime-play-entity'. + + * mime-play.el (mime-play-entity): Change interface. + +1999-01-21 MORIOKA Tomohiko + + * NEWS (Changes in SEMI 1.13): New section. + + * NEWS (Changes in SEMI 1.12): New section. + +1999-01-21 MORIOKA Tomohiko + + * mime-pgp.el (mime-view-application/pgp): Don't expect called in + raw-buffer. + (mime-verify-application/pgp-signature): Likewise. + + * mime-play.el: Abolish variable + `mime-preview-after-decoded-position'. + (mime-preview-play-current-entity): Use `mime-play-entity' simply; + don't switch to raw-buffer. + (mime-play-entity): renamed from `mime-raw-play-entity'; don't + expect called in raw-buffer. + (mime-activate-mailcap-method): Don't expect called in raw-buffer. + (mime-show-echo-buffer): Permit to run in preview-buffer. + + 1999-01-21 MORIOKA Tomohiko * SEMI: Version 1.12.1 ([JR] Nonoichi) released. diff --git a/Makefile b/Makefile index 0b459b5..84d8c26 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,10 @@ # PACKAGE = semi -API = 1.12 -RELEASE = 1 +API = 1.13 +RELEASE = 7 + +FLIM_API= 1.13 TAR = tar RM = /bin/rm -f @@ -15,7 +17,6 @@ XEMACS = xemacs FLAGS = -batch -q -no-site-file -l SEMI-MK PREFIX = NONE -EXEC_PREFIX = NONE LISPDIR = NONE PACKAGEDIR = NONE VERSION_SPECIFIC_LISPDIR = NONE @@ -23,18 +24,16 @@ VERSION_SPECIFIC_LISPDIR = NONE GOMI = *.elc VERSION = $(API).$(RELEASE) -ARC_DIR = /pub/GNU/elisp/semi/semi-$(API)-for-flim-1.12 +ARC_DIR = /pub/mule/semi/semi-$(API)-for-flim-$(FLIM_API) elc: $(EMACS) $(FLAGS) -f compile-semi \ - $(PREFIX) $(EXEC_PREFIX) $(LISPDIR) \ - $(VERSION_SPECIFIC_LISPDIR) + $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) install-elc: elc $(EMACS) $(FLAGS) -f install-semi \ - $(PREFIX) $(EXEC_PREFIX) $(LISPDIR) \ - $(VERSION_SPECIFIC_LISPDIR) + $(PREFIX) $(LISPDIR) $(VERSION_SPECIFIC_LISPDIR) install: install-elc @@ -62,7 +61,8 @@ tar: cd /tmp; $(TAR) cvzf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) cd /tmp; $(RM) -r $(PACKAGE)-$(VERSION) sed "s/VERSION/$(VERSION)/" < ftp.in | sed "s/API/$(API)/" \ - | sed "s/PACKAGE/$(PACKAGE)/" > ftp + | sed "s/PACKAGE/$(PACKAGE)/" \ + | sed "s/FLIM_API/$(FLIM_API)/" > ftp release: -$(RM) $(ARC_DIR)/$(PACKAGE)-$(VERSION).tar.gz diff --git a/NEWS b/NEWS index f4c2d8e..529574f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,80 @@ SEMI NEWS --- history of major-changes. -Copyright (C) 1998 Free Software Foundation, Inc. +Copyright (C) 1998,1999 Free Software Foundation, Inc. +* Changes in SEMI 1.13 + +** Requires FLIM 1.13 API + + +** Don't expect raw-buffer + +In FLIM 1.13 API, existence of a raw-buffer corresponding to each +entity is not guaranteed. + +*** Now acting-method must not expect to run in raw-buffer + +Function `mime-play-entity' was changed to permit to run in any buffer +(may be called in preview-buffer). So each acting-method is called in +any buffer. + +*** Don't refer variable `mime-raw-buffer' + +Preview-buffer's local variable `mime-raw-buffer' is deleted. So +don't refer it. + +*** Don't refer variable `mime-preview-buffer' + +There are no guarantee about existence of a raw-buffer corresponding +to each entity, so don't refer buffer local variables of the +raw-buffer, e.g. `mime-preview-buffer'. + + +** Function `mime-play-entity' + +Function `mime-play-entity' was renamed from `mime-raw-play-entity' +and changed interface. + +Current interface is: + + mime-play-entity (entity &optional situation ignored-method) + +Please use `situation' if you would like to specify `mode' and +`ignore-examples'. + + +** Text property `mime-view-entity-{header|body}' + +Now mime-view put text property `mime-view-entity-header' and +`mime-view-entity-body' in header and body of each entity. + + +** Behavior change about `mime-display-header-hook' + +Function `mime-display-entity' runs `mime-display-header-hook' before +it inserts "\n". + +In addition, now it is cleared that current point means beginning of +header when `mime-display-entity' runs `mime-display-header-hook'. +Therefore header-presentation-method must not change current point. + + +** New variable `mime-preview-move-scroll' + +This variables decides how to scroll in the MIME-View-mode +when mime-preview-move-upper, mime-preview-move-previous, +mime-preview-move-next is called. Those are bound to `u', `p', `n', +respectively. + + +* Changes in SEMI 1.12 + +There are no user-visible changes. + +** New function `eliminate-top-spaces' + +Now mime-edit has it. + + * Changes in SEMI 1.11 ** New function `mime-edit-decode-message-in-buffer' diff --git a/README.en b/README.en index 54a01ff..7f2d51b 100644 --- a/README.en +++ b/README.en @@ -40,22 +40,18 @@ Required environment 19.14. SEMI also does not support Emacs 19.29 to 19.34, XEmacs 19.15 or XEmacs 20.2 without mule, but SEMI may work with them. - SEMI requires APEL (9.11 or later) and FLIM (1.12.0 or later) + SEMI requires APEL (9.20 or later) and FLIM (1.13.1 or later) package. Please install them before installing it. APEL package is available at: - ftp://ftp.jaist.ac.jp/pub/GNU/elisp/apel/ + ftp://ftp.etl.go.jp/pub/mule/apel/ and FLIM package is available at: - ftp://ftp.jaist.ac.jp/pub/GNU/elisp/flim/ + ftp://ftp.etl.go.jp/pub/mule/flim/flim-1.13/ PGP/MIME and application/pgp require mailcrypt or tiny-pgp package. - The package enriched.el is required to compose text/enriched, so if - you use Emacs anything 19.28 or older (including official version of - MULE 2.3), WYSIWYG composing for text/enriched is not available. - Installation ============ diff --git a/README.ja b/README.ja deleted file mode 100644 index d313b38..0000000 --- a/README.ja +++ /dev/null @@ -1,258 +0,0 @@ -[SEMI $B$N3K%Q%C%1!<%8$N(B README ($BF|K\8lHG(B)] - -SEMI $B$H$O!)(B -============ - - SEMI $B$O(B GNU Emacs $B$K(B MIME $B5!G=$rDs6!$9$k%i%$%V%i%j!<$G$9!#(BMIME $B$O%a%C(B - $B%;!<%8$K(B (ASCII) plain text $B0J30$NFbMF$d%X%C%@!<$r4^$a$i$l$k$h$&$K$9(B - $B$k$?$a$KDs0F$5$l$F$$$k(B internet standard $B$G$9!#(B - - RFC 2045 : Internet Message Bodies - RFC 2046 : Media Types - RFC 2047 : Message Header Extensions - RFC 2048 : MIME Registration Procedures - RFC 2049 : MIME Conformance - - SEMI $B$O0J2<$N5!G=$,$"$j$^$9!#(B - - - MIME $B%a%C%;!<%81\Mw(B (mime-view-mode) (RFC 2045 .. 2049) - - MIME $B%a%C%;!<%8:n@.(B (mime-edit-mode) (RFC 2045 .. 2049) - - MIME $B%a%C%;!<%81\Mw$H:n@.$O0J2<$N5!G=$bDs6!$7$F$$$^$9(B: - - - Content-Disposition $B%U%#!<%k%I$K$h$k%U%!%$%kL>$N07$$(B (RFC - - 1806) - - PGP/MIME $B0BA4$J(B Multipart (RFC 2015) - - application/pgp (draft-kazu-pgp-mime-00.txt; obsolete) - - text/richtext (RFC 1521; obsolete; $B1\Mw$N$_(B) - - text/enriched (RFC 1896) - - mailcap $B$K$h$k30ItJ}K!@_Dj(B (RFC 1524) - - $B$3$N%Q%C%1!<%8$O(B MUA $B$N$?$a$N(B MIME $B3HD%$r4^$s$G$$$J$$$3$H$KCm0U$7$F(B - $B$/$@$5$$!#$=$l$i$OJL$N%Q%C%1!<%8$H$7$F%j%j!<%9$5$l$^$9!#(B - - -$BI,MW$J4D6-(B -========== - - SEMI $B$O(B mule $B5!G=$D$-$N(B XEmacs 20.2 $B0J9_$H(B Emacs 20 $B$r%5%]!<%H$7$^$9!#(B - - SEMI $B$O(B Emacs 19.28 $B$d(B XEmacs 19.14 $B0JA0$O%5%]!<%H$7$^$;$s!#(BSEMI $B$O(B - Emacs 19.29 $B$+$i(B Emacs 19.34$B!"(BXEmacs 19.15 $B$+$i(B mule $B5!G=$N$J$$(B - XEmacs 20.2 $B$^$G$O%5%]!<%H$7$^$;$s$,!"(BSEMI $B$O$=$l$i$GF0:n$9$k$+$b$7(B - $B$l$^$;$s!#(B - - SEMI $B$O(B APEL (9.11 $B0J9_(B) $B$H(B FLIM (1.12.0 $B0J9_(B) $B$rI,MW$H$7$^$9!#(BSEMI - $B$r%$%s%9%H!<%k$9$kA0$K$^$:$=$l$i$r%$%s%9%H!<%k$7$F$/$@$5$$!#(BAPEL $B%Q%C(B - $B%1!<%8$O0J2<$N$H$3$m$Gl=j$G$N%G%#%l%/%H%j!<$K%$%s%9%H!<%k$7$?$/$J$$$J$i!"0J2<$N$3$H$@$1$r$d$C(B - $B$F$/$@$5$$(B: - - % make - - emacs $B$N%3%^%s%IL>$r;XDj$9$k$3$H$,$G$-$^$9!#Nc$($P!"(B - - % make EMACS=xemacs - - `EMACS=...' $B$,>JN,$5$l$k$H!"(BEmacs=emacs $B$,;H$o$l$^$9!#(B - -(b) make install - - $BB>$N%G%#%l%/%H%j!<$K%$%s%9%H!<%k$7$?$$$J$i!"0J2<$N$3$H$r$7$F$/$@$5$$(B: - - % make install - - emacs $B$N%3%^%s%IL>$r;XDj$9$k$3$H$,$G$-$^$9!#Nc$($P!"(B - - % make install EMACS=xemacs - - `EMACS=...' $B$,>JN,$5$l$k$H!"(BEmacs=emacs $B$,;H$o$l$^$9!#(B - - Emacs Lisp $B%W%m%0%i%`$H%7%'%k%9%/%j%W%H$N$?$a$N%G%#%l%/%H%j!JN,$5$l$k$H!";XDj$5$l$?(B emacs $B%3%^%s%I$N%G%#%l%/%H%j!<(B - $BLZ$N@\F,<-$,;HMQ$5$l$^$9(B ($B$*$=$i$/(B /usr/local $B$G$9(B)$B!#(B - - $BNc$($P!"(BPREFIX=/usr/local $B$H(B Emacs 19.34 $B$,;XDj$5$l$l$P!"0J2<$N%G%#(B - $B%l%/%H%j!JN,$5$l$k$H!";XDj$5$l$?(B emacs $B$N%3%^%s%I$N(B - site-lisp $B%G%#%l%/%H%j!<$,;H$o$l$^$9(B ($B$*$=$i$/(B - /usr/local/share/emacs/site-lisp $B$+(B /usr/local/lib/xemacs/site-lisp) - $B$G$9!#(B - - emu $B%b%8%e!<%k(B (APEL $B%Q%C%1!<%8$KF~$C$F$$$^$9(B) $B$,I8=`$G$J$$%G%#%l%/(B - $B%H%j!<$K%$%s%9%H!<%k$5$l$F$$$k>l9g$O!"$=$l$i$N$"$k>l=j$r;XDj$9$kI,MW(B - $B$,$"$j$^$9!#Nc$($P!"(B: - - % make install VERSION_SPECIFIC_LISPDIR=~/elisp - -(c) XEmacs $B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k$9$k(B - - XEmacs $B$N%Q%C%1!<%8%G%#%l%/%H%j!<$K%$%s%9%H!<%k$9$k>l9g$O!"0J2<$N$3(B - $B$H$r$7$F$/$@$5$$(B: - - % make install-package - - emacs $B$N%3%^%s%IL>$r;XDj$9$k$3$H$,$G$-$^$9!#Nc$($P!"(B - - % make install-package XEMACS=xemacs-21 - - `XEMACS=...' $B$,>JN,$5$l$k$H!"(BXEMACS=xemacs $B$,;HMQ$5$l$^$9!#(B - - $B%Q%C%1!<%8$N%G%#%l%/%H%j!<$r;XDj$9$k$3$H$,$G$-$^$9!#Nc$($P(B: - - % make install PACKAGEDIR=~/.xemacs - - `PACKAGEDIR=...' $B$,>JN,$5$l$k$H!"B8:_$9$k%Q%C%1!<%8%G%#%l%/%H%j!<$N(B - $B:G=i$N$b$N$,;H$o$l$^$9!#(B - - XEmacs $B$N%Q%C%1!<%8%7%9%F%`$O(B XEmacs 21.0 $B$+$=$l0J9_$rMW5a$9$k$3$H$K(B - $BCm0U$7$F$/$@$5$$!#(B - -(a,b,c) - - $BB>$N>JN,2DG=$J@_Dj$r%U%!%$%k(B ${archive}/SEMI-CFG $B$rJT=8$9$k$3$H$G;X(B - $BDj$G$-$^$9!#(B${archive}/README.ja $B$H(B ${archive}/SEMI/CFG $B$N%3%a%s%H$r(B - $BFI$s$G$/$@$5$$!#(B - -$B=i4|2=(B -============== - -(a) load-path - - Emacs $B$+(B Mule $B$r;H$C$F$$$k$J$i!"(BFLIM $B$N%G%#%l%/%H%j!<$r(B - load-path $B$KDI2C$7$F$/$@$5$$!#=i4|@_Dj$G%$%s%9%H!<%k$7$?$J$i!"-Mh$N3HD%$N5DO@$r$7$?$j$9$k$3$H$,$G$-$^$9!#(Btm ML $B$K(B - $B;22C$9$k$K$O!"6u$NEE;R%a!<%k$r(B - - tm-en-help@chamonix.jaist.ac.jp ($B1Q8l(B) - tm-ja-help@chamonix.jaist.ac.jp ($BF|K\8l(B) - - $B$KAw$C$F$/$@$5$$!#(B - - morioka@jaist.ac.jp $B$N$h$&$J!":n@\%a!<%k$rAw$i$J$$$h$&$KCm0U$7(B - $B$F$/$@$5$$!#$=$l$O!"H/@8$7$?LdBj$OB>$N4D6-$G$b5/$3$C$F$$$k$O$:$@$+$i(B - $B$G$9(B ($B$b$7$=$&$G$J$1$l$P!"$=$l$O@_Dj$NLdBj$G!"(BSEMI $B$N%P%0$G$O$"$j$^(B - $B$;$s(B)$B!#(B tm $B%a!<%j%s%0%j%9%H$G5DO@$9$Y$-$G$9!#$H$K$+$/!":n@\(B - $B$N%a!<%k$OH?1~$,$J$$$+$b$7$l$^$;$s!#%a!<%k$O(B tm $B%a!<%j%s%0%j%9%H$XAw$C(B - $B$F$/$@$5$$!#(B - - -CVS $B$K$h$k3+H/(B -===================== - - CVS $B$K$h$k3+H/$K;22C$7$?$$$H$-$O!"%"%+%&%s%HL>$H(B UNIX $BMM<0$G0E9f2=$5(B - $B$l$?%Q%9%o!<%I$r(B - - cvs@chamonix.jaist.ac.jp - - $B$KAw$C$F$/$@$5$$!#3+H/$K;22C$5$l$k$3$H$r4|BT$7$F$$$^$9!#(B - - -$B:n - (the author of mime-view and various parts of SEMI) - UMEDA Masanobu - (the author of mime.el of emacs-mime-tools. mime.el is the - origin of mime-edit.el of SEMI) - -$BB>$N:n - (a major author of signature.el and a lot of codes) - MASUTANI Yasuhiro - (anonymous ftp codes of mime-play.el) - OKABE Yasuo - (a major author of mime-partial.el and signature.el) - - Steinar Bang - Steven L. Baur - Kevin Broadey - Alastair Burt - Eric Ding - Thierry Emery - Simon Josefsson - Jens Lautenbacher - Carsten Leonhardt - Pekka Marjola - Hisashi Miyashita - Kazuhiro Ohta - Alexandre Oliva - Fran,Ag(Bois Pinard - Artur Pioro - Dan Rich - (contribute to evolve mime-image.el with XEmacs) - Katsumi Yamaoka diff --git a/SEMI-CFG b/SEMI-CFG index c05df10..7485f10 100644 --- a/SEMI-CFG +++ b/SEMI-CFG @@ -77,10 +77,11 @@ ;;; (let ((path (get-latest-path "bbdb" 'all-paths))) - (when path - (add-path path) - (add-path (expand-file-name "lisp" path)) ; run-in-place installation - )) + (if path + (progn + (add-path path) + (add-path (expand-file-name "lisp" path)) ; run-in-place installation + ))) ;; Or please specify path. ;; (add-path "bbdb-1.50" 'all-paths) @@ -91,10 +92,11 @@ ;;; (let ((path (get-latest-path "w3" 'all-paths))) - (when path - (add-path path) - (add-path (expand-file-name "lisp" path)) ; run-in-place installation - )) + (if path + (progn + (add-path path) + (add-path (expand-file-name "lisp" path)) ; run-in-place installation + ))) ;; Or please specify path. ;; (add-path "w3-4.0pre.20" 'all-paths) @@ -115,13 +117,6 @@ (defvar PREFIX install-prefix) ;;(setq PREFIX "~/") -;; Please specify install path prefix for binaries. -(defvar EXEC_PREFIX - (if (or running-emacs-18 running-xemacs) - (expand-file-name "../../.." exec-directory) - (expand-file-name "../../../.." exec-directory) - )) - ;; Please specify emu prefix [optional] (setq EMU_PREFIX (if (string-match "XEmacs" emacs-version) @@ -135,9 +130,6 @@ ;;; @ executables ;;; -;; Please specify binary path. -(defvar BIN_DIR (expand-file-name "bin" EXEC_PREFIX)) - ;; Please specify binary path. (for external method scripts) (setq METHOD_DIR (expand-file-name "share/semi" PREFIX)) diff --git a/SEMI-MK b/SEMI-MK index 6a0de68..bd5f525 100644 --- a/SEMI-MK +++ b/SEMI-MK @@ -11,11 +11,6 @@ (defvar PREFIX prefix) )) (setq command-line-args-left (cdr command-line-args-left)) - (and (setq exec-prefix (car command-line-args-left)) - (or (string-equal "NONE" exec-prefix) - (defvar EXEC_PREFIX exec-prefix) - )) - (setq command-line-args-left (cdr command-line-args-left)) (and (setq lisp-dir (car command-line-args-left)) (or (string-equal "NONE" lisp-dir) (defvar LISPDIR lisp-dir) @@ -32,8 +27,8 @@ ) (load-file "SEMI-CFG") (load-file "SEMI-ELS") - (princ (format "PREFIX=%s\tEXEC_PREFIX=%s -LISPDIR=%s\n" PREFIX EXEC_PREFIX LISPDIR)) + (princ (format "PREFIX=%s +LISPDIR=%s\n" PREFIX LISPDIR)) ) (defun directory= (dir1 dir2) @@ -83,14 +78,14 @@ LISPDIR=%s\n" PREFIX EXEC_PREFIX LISPDIR)) (Custom-make-dependencies) (compile-elisp-modules (append semi-modules-to-compile - '(auto-autoloads custom-load)) + '(mime-setup auto-autoloads custom-load)) ".") ) (defun install-semi-package () (config-semi-package) (install-elisp-modules (append semi-modules - '(mime auto-autoloads custom-load)) + '(mime-setup auto-autoloads custom-load)) "./" (expand-file-name SEMI_PREFIX (expand-file-name "lisp" diff --git a/TODO b/TODO index 4a051ff..4be8a0e 100644 --- a/TODO +++ b/TODO @@ -5,48 +5,9 @@ ** dynamic configuration for 'mime-preview-condition -** multipart/related support +** Don't expect raw-buffer -** Don't use filter-model - - tomo (major developer of SEMI) and akr (major developer of -FLIM-FLAM) discussed about Emacs 20.3 problem related with SEMI and -FLIM. They found essential problem with Emacs 20.3 are: - - - Emacs 20.3 separates string-type to unibyte-string and - multibyte-string. Emacs 20.3 has enough APIs to treat them. - - - Buffer has mode about interpretation of contents. Each mode is - designed to save semantics as characters. Namely buffer contains - unibyte-characters or multibyte-characters. One buffer can not - contain both representations. - - - {decode|encode}-coding-{region|string} run in byte world. So it - is not harmonized with other API. - - - It seems easy to write code in one mode or one world - (unibyte-string or multibyte-string). However it seems not easy - to write inter-mode program, such as SEMI. - - - Byte <-> byte conversion, such as base64, quoted-printable, must - be run only with unibyte-mode. - - - Byte <-> character conversion, such as - {decode|encode}-coding-region, should not be defined in single - buffer. Instead of them, decoder should read from unibyte buffer - and output to multibyte buffer. Similarly, encoder should read - from multibyte buffer and output to unibyte buffer. - `insert-buffer-substring' like API may be suitable. Anyway Emacs - introduces multiple representations, so it should be redesigned - based on multiple representation world model. - - Anyway FLIM should introduce new APIs based on inter-representation -world model. Conventional APIs should be implemented based on new -APIs. - - SEMI should abolish filter model and introduce new methods to -display inline data. These methods should use new FLIM APIs based on -inter-representation world model. +** lazy generating of situations from mime-entity information * MIME-Edit diff --git a/VERSION b/VERSION index e103fee..9c1fa27 100644 --- a/VERSION +++ b/VERSION @@ -73,7 +73,14 @@ 1.11.0 Kanazawa $(B6bBt(B ; <=> $(BKLN&E4F;(B $(BKLE46bBt(B 1.12.0 Nishi-Kanazawa $(B@>6bBt(B ; <=> $(BKLN&E4F;(B $(B?7@>6bBt(B 1.12.1 [JR] Nonoichi [JR] $(BLn!9;T(B ------- Matt-Dò-A $(B>>G$(B +1.13.0 Matt-Dò-A $(B>>G$(B +1.13.1 Kaga-Kasama $(B2C2l3^4V(B +1.13.2 Mikawa $(BH~@n(B +1.13.3 Komaiko $(B>.Iq;R(B +1.13.4 Terai $(B;{0f(B +1.13.5 Meih-Dò-A $(BL@Jv(B +1.13.6 Komatsu $(B>.>>(B +1.13.7 Awazu $(B0@DE(B : : : ------- Tsuruga $(BFX2l(B ; = JR $(B>.IM@~(B ------- Shin-Hikida $(B?7I%ED(B @@ -135,17 +142,30 @@ 1.11.0 Okitsu $(B6=DE(B 1.12.0 Shimizu $(B@6?e(B 1.12.1 Kusanagi $(BApFe(B ------- Shizuoka $(B@E2,(B ------- Abekawa $(B0BG\@n(B ------- Mochimune $(BMQ=!(B ------- Yaizu $(B>FDE(B ------- Nishi-Yaizu $(B@>>FDE(B ------- Fijieda $(BF#;^(B ------- Rokug-Dò-A $(BO;9g(B ------- Shimada $(BEgED(B +1.13.0 Shizuoka $(B@E2,(B +1.13.1 Abekawa $(B0BG\@n(B +1.13.2 Mochimune $(BMQ=!(B +1.13.3 Yaizu $(B>FDE(B +1.13.4 Nishi-Yaizu $(B@>>FDE(B +1.13.5 Fijieda $(BF#;^(B +1.13.6 Rokug-Dò-A $(BO;9g(B +1.13.7 Shimada $(BEgED(B ------ Kanaya $(B6bC+(B ; = $(BBg0f@nE4F;(B ------ Kikugawa $(B5F@n(B ------ Kakegawa $(B3]@n(B ; = $(BE7N5IML>8PE4F;(B +------ Fukuroi $(BB^0f(B +------ Iwata $(BHXED(B +------ Toyodach-Dò-A $(BK-EDD.(B +------ Tenry-Dþgawa-A $(BE7N5@n(B +------ Hamamatsu $(BIM>>(B ; = $(B1s=#E4F;(B +------ Takatsuka $(B9bDM(B +------ Maisaka $(BIq:e(B +------ Bentenjima $(BJ[E7Eg(B +------ Araimachi $(B?75oD.(B +------ Wasizu $(BOIDE(B +------ Shinjohara $(B?7=j86(B ; = $(BE7N5IML>8PE4F;(B +------ Futagawa $(BFs2O(B +------ Toyohashi $(BK-66(B ; = JR $(BHSED@~(B : : : ------ Kanayama $(B6b;3(B ; =$(B!J(BJR $(BCf1{K\@~!K(B ------ Ot-Dòbashi-A $(BHxF,66(B @@ -186,6 +206,15 @@ 1.8.3 Ecch-Dþ-Nakagawa-A $(B1[CfCf@n(B 1.8.4 Takaoka $(B9b2,(B ; = JR $(BKLN&K\@~!">kC<@~(B +;;------------------------------------------------------------------------- +;; Hokuetsu Express $(BKL1[5^9T(B +;; http://www.tiara.or.jp/~tokamaci/hokuhoku/hokuhoku.html +;; Hokuhoku Line $(B$[$/$[$/@~(B +;;------------------------------------------------------------------------- +1.13.0 Saigata $(B:T3c(B ; = JR $(B?.1[K\@~(B +1.13.1 Kubiki $(B$/$S$-(B +1.13.2 -DÒike-Ikoinomori-A $(BBgCS$$$3$$$N?9(B + [etc.] diff --git a/ftp.in b/ftp.in index 6c3ad02..848fbe2 100644 --- a/ftp.in +++ b/ftp.in @@ -2,12 +2,16 @@ It is available from - ftp://ftp.jaist.ac.jp/pub/GNU/elisp/semi/semi-API-for-flim-1.12 + ftp://ftp.m17n.org/pub/mule/semi/semi-API-for-flim-FLIM_API + +or + + ftp://ftp.etl.go.jp/pub/mule/semi/semi-API-for-flim-FLIM_API --[[message/external-body; access-type=anon-ftp; - site="ftp.jaist.ac.jp"; - directory="/pub/GNU/elisp/semi/semi-API-for-flim-1.12"; + site="ftp.m17n.org"; + directory="/pub/mule/semi/semi-API-for-flim-FLIM_API"; name="PACKAGE-VERSION.tar.gz"; mode=image]] Content-Type: application/octet-stream; diff --git a/mime-bbdb.el b/mime-bbdb.el index 62bc191..1b61d64 100644 --- a/mime-bbdb.el +++ b/mime-bbdb.el @@ -161,13 +161,13 @@ the user confirms the creation." (if bbdb-use-pop-up (mime-bbdb/pop-up-bbdb-buffer offer-to-create) (let* ((message (get-text-property (point-min) 'mime-view-entity)) - (from (mime-fetch-field 'From message)) + (from (mime-entity-fetch-field message 'From)) addr) (if (or (null from) - (null (setq addr (car (mime-read-field 'From message)))) + (null (setq addr (car (mime-entity-read-field message 'From)))) (string-match (bbdb-user-mail-names) (std11-address-string addr))) - (setq from (or (mime-fetch-field 'To message) + (setq from (or (mime-entity-fetch-field message 'To) from)) ) (if from diff --git a/mime-edit.el b/mime-edit.el index 89b4655..81b7613 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1,6 +1,6 @@ ;;; mime-edit.el --- Simple MIME Composer for GNU Emacs -;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1993,94,95,96,97,98,99 Free Software Foundation, Inc. ;; Author: UMEDA Masanobu ;; MORIOKA Tomohiko @@ -109,6 +109,7 @@ (require 'sendmail) (require 'mail-utils) (require 'mel) +(require 'eword-encode) ; eword-encode-field-body (require 'mime-view) (require 'signature) (require 'alist) @@ -120,13 +121,11 @@ (eval-and-compile (defconst mime-edit-version - (eval-when-compile - (concat - (mime-product-name mime-user-interface-product) " " - (mapconcat #'number-to-string - (mime-product-version mime-user-interface-product) ".") - " - \"" (mime-product-code-name mime-user-interface-product) "\""))) - ) + (concat + (mime-product-name mime-user-interface-product) " " + (mapconcat #'number-to-string + (mime-product-version mime-user-interface-product) ".") + " - \"" (mime-product-code-name mime-user-interface-product) "\""))) ;;; @ variables @@ -192,7 +191,7 @@ To insert a signature file automatically, call the function ("css") ; rfc2318 ("xml") ; rfc2376 ("x-latex") - ("x-rot13-47-48") + ;; ("x-rot13-47-48") ) ("message" ("external-body" @@ -221,6 +220,7 @@ To insert a signature file automatically, call the function ("application" ("octet-stream" ("type" "" "tar" "shar")) ("postscript") + ("vnd.ms-powerpoint") ("x-kiss" ("x-cnf"))) ("image" ("gif") @@ -305,6 +305,11 @@ To insert a signature file automatically, call the function "base64" "attachment" (("filename" . file)) ) + ("\\.ppt$" ; MS Power Point + "application" "vnd.ms-powerpoint" nil + "base64" + "attachment" (("filename" . file)) + ) ("\\.pln$" "text" "plain" nil @@ -485,6 +490,7 @@ If encoding is nil, it is determined from its contents." (cn-big5 8 "base64") (big5 8 "base64") (shift_jis 8 "base64") + (tis-620 8 "base64") (iso-2022-jp-2 7 "base64") (iso-2022-int-1 7 "base64") )) @@ -627,20 +633,27 @@ If it is not specified for a major-mode, (mime-product-code-name mime-library-product) ") " (if (featurep 'xemacs) - (concat (if (featurep 'mule) "MULE") + (concat (cond ((featurep 'utf-2000) + (concat "UTF-2000-MULE/" utf-2000-version)) + ((featurep 'mule) "MULE")) " XEmacs" - (if (string-match "\\s +\\\"" emacs-version) - (concat "/" - (substring emacs-version 0 - (match-beginning 0)) - (if (and (boundp 'xemacs-betaname) - ;; It does not exist in XEmacs - ;; versions prior to 20.3. - xemacs-betaname) - (concat " " xemacs-betaname) - "") - " (" xemacs-codename ") (" - system-configuration ")") + (if (string-match "^[0-9]+\\(\\.[0-9]+\\)" emacs-version) + (concat + "/" + (substring emacs-version 0 (match-end 0)) + (cond ((and (boundp 'xemacs-betaname) + xemacs-betaname) + ;; It does not exist in XEmacs + ;; versions prior to 20.3. + (concat " " xemacs-betaname)) + ((and (boundp 'emacs-patch-level) + emacs-patch-level) + ;; It does not exist in FSF Emacs or in + ;; XEmacs versions earlier than 21.1.1. + (format " (patch %d)" emacs-patch-level)) + (t "")) + " (" xemacs-codename ") (" + system-configuration ")") " (" emacs-version ")")) (let ((ver (if (string-match "\\.[0-9]+$" emacs-version) (substring emacs-version 0 (match-beginning 0)) @@ -675,13 +688,14 @@ inserted into message header.") Tspecials means any character that matches with it in header must be quoted.") (defconst mime-edit-mime-version-value - (eval-when-compile - (concat "1.0 (generated by " mime-edit-version ")")) + (concat "1.0 (generated by " mime-edit-version ")") "MIME version number.") (defconst mime-edit-mime-version-field-for-message/partial - (eval-when-compile - (concat "MIME-Version: 1.0 (split by " mime-edit-version ")\n")) + (concat "MIME-Version:" + (eword-encode-field-body + (concat " 1.0 (split by " mime-edit-version ")\n") + "MIME-Version:")) "MIME version field for message/partial.") @@ -2163,8 +2177,7 @@ Content-Transfer-Encoding: 7bit (goto-char (point-min)) (while (re-search-forward regexp nil t) (delete-region (match-beginning 0) - (progn (forward-line 1) (point))) - ))) + (1+ (std11-field-end)))))) ;;; @@ -2572,8 +2585,9 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (defun mime-edit-quitting-method () "Quitting method for mime-view." - (let ((temp mime-raw-buffer) - buf) + (let* ((entity (get-text-property (point-min) 'mime-view-entity)) + (temp (mime-entity-buffer entity)) + buf) (mime-preview-kill-buffer) (set-buffer temp) (setq buf mime-edit-buffer) @@ -2681,7 +2695,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" "^Content-Transfer-Encoding:" limit t) (let ((beg (match-beginning 0)) (hbeg (match-end 0)) - (end (std11-field-end))) + (end (std11-field-end limit))) (setq encoding (downcase (eliminate-top-spaces @@ -2699,9 +2713,15 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" encoding nil) ))))))) (if (or encoded (not not-decode-text)) - (decode-mime-charset-region (point-min)(point-max) - (or charset default-mime-charset)) - ) + (progn + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "\r\n" nil t) + (replace-match "\n") + )) + (decode-mime-charset-region (point-min)(point-max) + (or charset default-mime-charset)) + )) (let ((he (if (re-search-forward "^$" nil t) (match-end 0) (point-min) diff --git a/mime-partial.el b/mime-partial.el index 14b3ff9..618c5a6 100644 --- a/mime-partial.el +++ b/mime-partial.el @@ -35,6 +35,7 @@ automatically." (let* ((id (cdr (assoc "id" situation))) (target (cdr (assq 'major-mode situation))) (subject-buf (eval (cdr (assq 'summary-buffer-exp situation)))) + (mother (current-buffer)) subject-id (root-dir (expand-file-name (concat "m-prts-" (user-login-name)) @@ -54,7 +55,7 @@ automatically." (not (y-or-n-p "Merge partials?")) ) (mime-store-message/partial-piece entity situation) - (setq subject-id (mime-read-field 'Subject entity)) + (setq subject-id (mime-entity-read-field entity 'Subject)) (if (string-match "[0-9\n]+" subject-id) (setq subject-id (substring subject-id 0 (match-beginning 0))) ) @@ -71,8 +72,7 @@ automatically." (situation (mime-entity-situation message)) (the-id (cdr (assoc "id" situation)))) (when (string= the-id id) - (save-excursion - (set-buffer (mime-entity-buffer message)) + (with-current-buffer mother (mime-store-message/partial-piece message situation) ) (if (file-exists-p full-file) diff --git a/mime-pgp.el b/mime-pgp.el index 0facca0..fb76f45 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -1,6 +1,6 @@ ;;; mime-pgp.el --- mime-view internal methods for PGP. -;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko +;; Copyright (C) 1995,1996,1997,1998,1999 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Created: 1995/12/7 @@ -52,9 +52,9 @@ (defun mime-verify-multipart/signed (entity situation) "Internal method to verify multipart/signed." - (mime-raw-play-entity + (mime-play-entity (nth 1 (mime-entity-children entity)) ; entity-info of signature - (cdr (assq 'mode situation)) ; play-mode + (list (assq 'mode situation)) ; play-mode )) @@ -63,17 +63,15 @@ ;;; It is based on draft-kazu-pgp-mime-00.txt (PGP-kazu). (defun mime-view-application/pgp (entity situation) - (let* ((p-win (or (get-buffer-window mime-preview-buffer) + (let* ((p-win (or (get-buffer-window (current-buffer)) (get-largest-window))) (new-name (format "%s-%s" (buffer-name) (mime-entity-number entity))) - (the-buf (current-buffer)) - (mother mime-preview-buffer) + (mother (current-buffer)) representation-type) (set-buffer (get-buffer-create new-name)) (erase-buffer) - (insert-buffer-substring - the-buf (mime-entity-point-min entity) (mime-entity-point-max entity)) + (mime-insert-entity entity) (cond ((progn (goto-char (point-min)) (re-search-forward "^-+BEGIN PGP SIGNED MESSAGE-+$" nil t)) @@ -132,7 +130,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") '((en . "Key matching expected Key ID \\(\\S +\\) not found")) "Alist of language vs regexp to detect ``Key expected''.") -(defun mime-pgp-check-signature (output-buffer orig-file) +(defun mime-pgp-check-signature (output-buffer sig-file orig-file) (save-excursion (set-buffer output-buffer) (erase-buffer)) @@ -140,7 +138,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (status (call-process-region (point-min)(point-max) mime-pgp-command nil output-buffer nil - orig-file (format "+language=%s" lang))) + sig-file orig-file (format "+language=%s" lang))) (regexp (cdr (assq lang mime-pgp-good-signature-regexp-alist)))) (if (= status 0) (save-excursion @@ -156,10 +154,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (defun mime-verify-application/pgp-signature (entity situation) "Internal method to check PGP/MIME signature." - (let* ((start (mime-entity-point-min entity)) - (end (mime-entity-point-max entity)) - (encoding (cdr (assq 'encoding situation))) - (entity-node-id (mime-raw-point-to-entity-node-id start)) + (let* ((entity-node-id (mime-entity-node-id entity)) (mother (mime-entity-parent entity)) (knum (car entity-node-id)) (onum (if (> knum 0) @@ -172,12 +167,8 @@ It should be ISO 639 2 letter language code such as en, ja, ...") ) (mime-write-entity orig-entity orig-file) (save-excursion (mime-show-echo-buffer)) - (mime-write-decoded-region (save-excursion - (goto-char start) - (and (search-forward "\n\n") - (match-end 0)) - ) end sig-file encoding) - (or (mime-pgp-check-signature mime-echo-buffer-name orig-file) + (mime-write-entity-content entity sig-file) + (or (mime-pgp-check-signature mime-echo-buffer-name sig-file orig-file) (let (pgp-id) (save-excursion (set-buffer mime-echo-buffer-name) @@ -234,7 +225,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (defun mime-add-application/pgp-keys (entity situation) (let* ((start (mime-entity-point-min entity)) (end (mime-entity-point-max entity)) - (entity-number (mime-raw-point-to-entity-number start)) + (entity-number (mime-entity-number entity)) (new-name (format "%s-%s" (buffer-name) entity-number)) (encoding (cdr (assq 'encoding situation))) str) diff --git a/mime-play.el b/mime-play.el index 65949f3..b4a03a2 100644 --- a/mime-play.el +++ b/mime-play.el @@ -64,58 +64,91 @@ (add-hook 'kill-emacs-hook 'mime-save-acting-situation-examples) (defun mime-reduce-acting-situation-examples () - (let* ((rest mime-acting-situation-example-list) - (min-example (car rest)) - (min-score (cdr min-example))) - (while rest - (let* ((example (car rest)) - (score (cdr example))) - (cond ((< score min-score) - (setq min-score score - min-example example) - ) - ((= score min-score) - (if (<= (length (car example))(length (car min-example))) - (setq min-example example) - )) - )) - (setq rest (cdr rest))) - (setq mime-acting-situation-example-list - (delq min-example mime-acting-situation-example-list)) - (setq min-example (car min-example)) - (let ((examples mime-acting-situation-example-list) - (max-score 0) - max-examples) - (while examples - (let* ((ret (mime-compare-situation-with-example min-example - (caar examples))) - (ret-score (car ret))) - (cond ((> ret-score max-score) - (setq max-score ret-score - max-examples (list (cdr ret))) + (let ((len (length mime-acting-situation-example-list)) + i ir ic j jr jc ret + dest d-i d-j + (max-sim 0) sim + min-det-ret det-ret + min-det-org det-org + min-freq freq) + (setq i 0 + ir mime-acting-situation-example-list) + (while (< i len) + (setq ic (car ir) + j 0 + jr mime-acting-situation-example-list) + (while (< j len) + (unless (= i j) + (setq jc (car jr)) + (setq ret (mime-compare-situation-with-example (car ic)(car jc)) + sim (car ret) + det-ret (+ (length (car ic))(length (car jc))) + det-org (length (cdr ret)) + freq (+ (cdr ic)(cdr jc))) + (cond ((< max-sim sim) + (setq max-sim sim + min-det-ret det-ret + min-det-org det-org + min-freq freq + d-i i + d-j j + dest (cons (cdr ret) freq)) ) - ((= ret-score max-score) - (setq max-examples (cons (cdr ret) max-examples)) - ))) - (setq examples (cdr examples))) - (while max-examples - (let* ((example (car max-examples)) - (cell (assoc example mime-acting-situation-example-list))) - (if cell - (setcdr cell (1+ (cdr cell))) - (setq mime-acting-situation-example-list - (cons (cons example 0) - mime-acting-situation-example-list)) - )) - (setq max-examples (cdr max-examples)) - )))) + ((= max-sim sim) + (cond ((> min-det-ret det-ret) + (setq min-det-ret det-ret + min-det-org det-org + min-freq freq + d-i i + d-j j + dest (cons (cdr ret) freq)) + ) + ((= min-det-ret det-ret) + (cond ((> min-det-org det-org) + (setq min-det-org det-org + min-freq freq + d-i i + d-j j + dest (cons (cdr ret) freq)) + ) + ((= min-det-org det-org) + (cond ((> min-freq freq) + (setq min-freq freq + d-i i + d-j j + dest (cons (cdr ret) freq)) + )) + )) + )) + )) + ) + (setq jr (cdr jr) + j (1+ j))) + (setq ir (cdr ir) + i (1+ i))) + (if (> d-i d-j) + (setq i d-i + d-i d-j + d-j i)) + (setq jr (nthcdr (1- d-j) mime-acting-situation-example-list)) + (setcdr jr (cddr jr)) + (if (= d-i 0) + (setq mime-acting-situation-example-list + (cdr mime-acting-situation-example-list)) + (setq ir (nthcdr (1- d-i) mime-acting-situation-example-list)) + (setcdr ir (cddr ir)) + ) + (if (setq ir (assoc (car dest) mime-acting-situation-example-list)) + (setcdr ir (+ (cdr ir)(cdr dest))) + (setq mime-acting-situation-example-list + (cons dest mime-acting-situation-example-list)) + ))) ;;; @ content decoder ;;; -(defvar mime-preview-after-decoded-position nil) - +;;;###autoload (defun mime-preview-play-current-entity (&optional ignore-examples mode) "Play current entity. It decodes current entity to call internal or external method. The @@ -126,15 +159,21 @@ If MODE is specified, play as it. Default MODE is \"play\"." (interactive "P") (let ((entity (get-text-property (point) 'mime-view-entity))) (if entity - (let ((the-buf (current-buffer)) - (raw-buffer (mime-entity-buffer entity))) - (setq mime-preview-after-decoded-position (point)) - (set-buffer raw-buffer) - (mime-raw-play-entity entity (or mode "play") nil ignore-examples) - (when (eq (current-buffer) raw-buffer) - (set-buffer the-buf) - (goto-char mime-preview-after-decoded-position) - ))))) + (let ((situation + (get-text-property (point) 'mime-view-situation))) + (or mode + (setq mode "play")) + (setq situation + (if (assq 'mode situation) + (put-alist 'mode mode (copy-alist situation)) + (cons (cons 'mode mode) + situation))) + (if ignore-examples + (setq situation + (cons (cons 'ignore-examples ignore-examples) + situation))) + (mime-play-entity entity situation) + )))) (defun mime-sort-situation (situation) (sort situation @@ -202,29 +241,21 @@ If MODE is specified, play as it. Default MODE is \"play\"." (cons match example) )) -(defun mime-raw-play-entity (entity &optional mode situation ignore-examples - ignored-method) +;;;###autoload +(defun mime-play-entity (entity &optional situation ignored-method) "Play entity specified by ENTITY. It decodes the entity to call internal or external method. The method is selected from variable `mime-acting-condition'. If MODE is specified, play as it. Default MODE is \"play\"." (let (method ret) - (or situation - (setq situation (mime-entity-situation entity))) - (if mode - (setq situation (cons (cons 'mode mode) situation)) - ) - (if ignore-examples - (or (assq 'ignore-examples situation) - (setq situation - (cons (cons 'ignore-examples ignore-examples) situation))) - ) + (in-calist-package 'mime-view) (setq ret (mime-delq-null-situation - (ctree-find-calist mime-acting-condition situation + (ctree-find-calist mime-acting-condition + (mime-entity-situation entity situation) mime-view-find-every-acting-situation) 'method ignored-method)) - (or ignore-examples + (or (assq 'ignore-examples situation) (if (cdr ret) (let ((rest ret) (max-score 0) @@ -303,7 +334,11 @@ specified, play as it. Default MODE is \"play\"." ;; ) (t (mime-show-echo-buffer "No method are specified for %s\n" - (mime-entity-type/subtype entity)) + (mime-type/subtype-string + (cdr (assq 'type situation)) + (cdr (assq 'subtype situation)))) + (if (y-or-n-p "Do you want to save current entity to disk?") + (mime-save-content entity situation)) )) )) @@ -314,34 +349,28 @@ specified, play as it. Default MODE is \"play\"." (defvar mime-mailcap-method-filename-alist nil) (defun mime-activate-mailcap-method (entity situation) - (save-excursion - (save-restriction - (let ((start (mime-entity-point-min entity)) - (end (mime-entity-point-max entity))) - (narrow-to-region start end) - (goto-char start) - (let ((method (cdr (assoc 'method situation))) - (name (mime-entity-safe-filename entity))) - (setq name - (if (and name (not (string= name ""))) - (expand-file-name name temporary-file-directory) - (make-temp-name - (expand-file-name "EMI" temporary-file-directory)) - )) - (mime-write-entity-content entity name) - (message "External method is starting...") - (let ((process - (let ((command - (mailcap-format-command - method - (cons (cons 'filename name) situation)))) - (start-process command mime-echo-buffer-name - shell-file-name shell-command-switch command) - ))) - (set-alist 'mime-mailcap-method-filename-alist process name) - (set-process-sentinel process 'mime-mailcap-method-sentinel) - ) - ))))) + (let ((method (cdr (assoc 'method situation))) + (name (mime-entity-safe-filename entity))) + (setq name + (if (and name (not (string= name ""))) + (expand-file-name name temporary-file-directory) + (make-temp-name + (expand-file-name "EMI" temporary-file-directory)) + )) + (mime-write-entity-content entity name) + (message "External method is starting...") + (let ((process + (let ((command + (mailcap-format-command + method + (cons (cons 'filename name) situation)))) + (start-process command mime-echo-buffer-name + shell-file-name shell-command-switch command) + ))) + (set-alist 'mime-mailcap-method-filename-alist process name) + (set-process-sentinel process 'mime-mailcap-method-sentinel) + ) + )) (defun mime-mailcap-method-sentinel (process event) (let ((file (cdr (assq process mime-mailcap-method-filename-alist)))) @@ -376,7 +405,8 @@ window.") (condition-case nil (setq win (get-buffer-window bbdb-buffer-name)) (error nil))) - (select-window (get-buffer-window mime-preview-buffer)) + (select-window (get-buffer-window (or mime-preview-buffer + (current-buffer)))) (setq win (split-window-vertically (- (window-height) (if (functionp mime-echo-window-height) @@ -389,8 +419,9 @@ window.") (select-window win) (goto-char (point-max)) (if forms - (insert (apply (function format) forms)) - ) + (let ((buffer-read-only nil)) + (insert (apply (function format) forms)) + )) (select-window the-win) )) @@ -412,8 +443,8 @@ window.") (let ((filename (or (mime-entity-filename entity) (let ((subj - (or (mime-read-field 'Content-Description entity) - (mime-read-field 'Subject entity)))) + (or (mime-entity-read-field entity 'Content-Description) + (mime-entity-read-field entity 'Subject)))) (if (and subj (or (string-match mime-view-file-name-regexp-1 subj) (string-match mime-view-file-name-regexp-2 subj))) @@ -482,17 +513,14 @@ SUBTYPE is symbol to indicate subtype of media-type.") ) t))) (setq rest (cdr rest)))) - (if type - (mime-raw-play-entity - entity nil - (put-alist 'type type - (put-alist 'subtype subtype - (del-alist 'method - (copy-alist situation)))) - (cdr (assq 'ignore-examples situation)) - 'mime-detect-content) - )) - ) + (setq situation (del-alist 'method (copy-alist situation))) + (mime-play-entity entity + (if type + (put-alist 'type type + (put-alist 'subtype subtype + situation)) + situation) + 'mime-detect-content))) ;;; @ mail/news message @@ -501,10 +529,11 @@ SUBTYPE is symbol to indicate subtype of media-type.") (defun mime-preview-quitting-method-for-mime-show-message-mode () "Quitting method for mime-view. It is registered to variable `mime-preview-quitting-method-alist'." - (let ((mother mime-mother-buffer) - (win-conf mime-preview-original-window-configuration) - ) - (kill-buffer mime-raw-buffer) + (let ((raw-buffer (mime-entity-buffer + (get-text-property (point-min) 'mime-view-entity))) + (mother mime-mother-buffer) + (win-conf mime-preview-original-window-configuration)) + (kill-buffer raw-buffer) (mime-preview-kill-buffer) (set-window-configuration win-conf) (pop-to-buffer mother) @@ -513,25 +542,25 @@ It is registered to variable `mime-preview-quitting-method-alist'." (defun mime-view-message/rfc822 (entity situation) (let* ((new-name (format "%s-%s" (buffer-name) (mime-entity-number entity))) - (mother mime-preview-buffer) - (children (car (mime-entity-children entity)))) - (set-buffer (get-buffer-create new-name)) - (erase-buffer) - (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) - (mime-view-buffer (current-buffer) nil mother - nil (if (mime-entity-cooked-p entity) 'cooked)) - )) + (mother (current-buffer)) + (children (car (mime-entity-children entity))) + (preview-buffer + (mime-display-message + children new-name mother nil + (cdr (assq 'major-mode + (get-text-property (point) 'mime-view-situation)))))) + (or (get-buffer-window preview-buffer) + (let ((m-win (get-buffer-window mother))) + (if m-win + (set-window-buffer m-win preview-buffer) + (switch-to-buffer preview-buffer) + ))))) ;;; @ message/partial ;;; (defun mime-store-message/partial-piece (entity cal) - (goto-char (mime-entity-point-min entity)) (let* ((root-dir (expand-file-name (concat "m-prts-" (user-login-name)) temporary-file-directory)) @@ -539,33 +568,28 @@ It is registered to variable `mime-preview-quitting-method-alist'." (number (cdr (assoc "number" cal))) (total (cdr (assoc "total" cal))) file - (mother mime-preview-buffer) - ) + (mother (current-buffer))) (or (file-exists-p root-dir) - (make-directory root-dir) - ) + (make-directory root-dir)) (setq id (replace-as-filename id)) (setq root-dir (concat root-dir "/" id)) (or (file-exists-p root-dir) - (make-directory root-dir) - ) + (make-directory root-dir)) (setq file (concat root-dir "/FULL")) (if (file-exists-p file) (let ((full-buf (get-buffer-create "FULL")) (pwin (or (get-buffer-window mother) (get-largest-window))) - ) + pbuf) (save-window-excursion (set-buffer full-buf) (erase-buffer) (as-binary-input-file (insert-file-contents file)) (setq major-mode 'mime-show-message-mode) (mime-view-buffer (current-buffer) nil mother) + (setq pbuf (current-buffer)) ) - (set-window-buffer pwin - (save-excursion - (set-buffer full-buf) - mime-preview-buffer)) + (set-window-buffer pwin pbuf) (select-window pwin) ) (setq file (concat root-dir "/" number)) @@ -597,7 +621,9 @@ It is registered to variable `mime-preview-quitting-method-alist'." (kill-buffer (current-buffer)) ))) ))) - (if (and total (> total 0)) + (if (and total (> total 0) + (>= (length (directory-files root-dir nil "^[0-9]+$" t)) + total)) (catch 'tag (save-excursion (set-buffer (get-buffer-create mime-temp-buffer-name)) @@ -628,15 +654,11 @@ It is registered to variable `mime-preview-quitting-method-alist'." (and (file-exists-p file) (delete-file file) )) - (save-window-excursion - (setq major-mode 'mime-show-message-mode) - (mime-view-buffer (current-buffer) nil mother) - ) (let ((pwin (or (get-buffer-window mother) (get-largest-window))) - (pbuf (save-excursion - (set-buffer full-buf) - mime-preview-buffer))) + (pbuf (mime-display-message + (mime-open-entity 'buffer (current-buffer)) + nil mother nil 'mime-show-message-mode))) (set-window-buffer pwin pbuf) (select-window pwin) ))))) @@ -683,23 +705,21 @@ It is registered to variable `mime-preview-quitting-method-alist'." (defun mime-view-caesar (entity situation) "Internal method for mime-view to display ROT13-47-48 message." - (let* ((new-name (format "%s-%s" (buffer-name) - (mime-entity-number entity))) - (mother mime-preview-buffer)) - (let ((pwin (or (get-buffer-window mother) - (get-largest-window))) - (buf (get-buffer-create new-name))) - (set-window-buffer pwin buf) - (set-buffer buf) - (select-window pwin) + (let ((buf (get-buffer-create + (format "%s-%s" (buffer-name) (mime-entity-number entity))))) + (with-current-buffer buf + (setq buffer-read-only nil) + (erase-buffer) + (mime-insert-text-content entity) + (mule-caesar-region (point-min) (point-max)) + (set-buffer-modified-p nil) ) - (setq buffer-read-only nil) - (erase-buffer) - (mime-insert-text-content entity) - (mule-caesar-region (point-min) (point-max)) - (set-buffer-modified-p nil) - (set-buffer mother) - (view-buffer new-name) + (let ((win (get-buffer-window (current-buffer)))) + (or (eq (selected-window) win) + (select-window (or win (get-largest-window))) + )) + (view-buffer buf) + (goto-char (point-min)) )) diff --git a/mime-view.el b/mime-view.el index 763b20e..119d972 100644 --- a/mime-view.el +++ b/mime-view.el @@ -39,11 +39,10 @@ ;;; (defconst mime-view-version - (eval-when-compile - (concat (mime-product-name mime-user-interface-product) " MIME-View " - (mapconcat #'number-to-string - (mime-product-version mime-user-interface-product) ".") - " (" (mime-product-code-name mime-user-interface-product) ")"))) + (concat (mime-product-name mime-user-interface-product) " MIME-View " + (mapconcat #'number-to-string + (mime-product-version mime-user-interface-product) ".") + " (" (mime-product-code-name mime-user-interface-product) ")")) ;;; @ variables @@ -63,6 +62,15 @@ :group 'mime-view :type 'file) +(defcustom mime-preview-move-scroll nil + "*Decides whether to scroll when moving to next entity. +When t, scroll the buffer. Non-nil but not t means scroll when +the next entity is within next-screen-context-lines from top or +buttom. Nil means don't scroll at all." + :group 'mime-view + :type '(choice (const :tag "Off" nil) + (const :tag "On" t) + (sexp :tag "Situation" 1))) ;;; @ in raw-buffer (representation space) ;;; @@ -83,24 +91,25 @@ major-mode or t. t means default. REPRESENTATION-TYPE must be `binary' or `cooked'.") -(defun mime-raw-find-entity-from-point (point &optional message-info) - "Return entity from POINT in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (or message-info - (setq message-info mime-message-structure)) - (if (and (<= (mime-entity-point-min message-info) point) - (<= point (mime-entity-point-max message-info))) - (let ((children (mime-entity-children message-info))) - (catch 'tag - (while children - (let ((ret - (mime-raw-find-entity-from-point point (car children)))) - (if ret - (throw 'tag ret) - )) - (setq children (cdr children))) - message-info)))) +;; (defun mime-raw-find-entity-from-point (point &optional message-info) +;; "Return entity from POINT in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (or message-info +;; (setq message-info mime-message-structure)) +;; (if (and (<= (mime-entity-point-min message-info) point) +;; (<= point (mime-entity-point-max message-info))) +;; (let ((children (mime-entity-children message-info))) +;; (catch 'tag +;; (while children +;; (let ((ret +;; (mime-raw-find-entity-from-point point (car children)))) +;; (if ret +;; (throw 'tag ret) +;; )) +;; (setq children (cdr children))) +;; message-info)))) +;; (make-obsolete 'mime-raw-find-entity-from-point "don't use it.") ;;; @ in preview-buffer (presentation space) @@ -112,15 +121,15 @@ If current MIME-preview buffer is generated by other buffer, such as message/partial, it is called `mother-buffer'.") (make-variable-buffer-local 'mime-mother-buffer) -(defvar mime-raw-buffer nil - "Raw buffer corresponding with the (MIME-preview) buffer.") -(make-variable-buffer-local 'mime-raw-buffer) +;; (defvar mime-raw-buffer nil +;; "Raw buffer corresponding with the (MIME-preview) buffer.") +;; (make-variable-buffer-local 'mime-raw-buffer) (defvar mime-preview-original-window-configuration nil "Window-configuration before mime-view-mode is called.") (make-variable-buffer-local 'mime-preview-original-window-configuration) -(defun mime-preview-original-major-mode (&optional recursive) +(defun mime-preview-original-major-mode (&optional recursive point) "Return major-mode of original buffer. If optional argument RECURSIVE is non-nil and current buffer has mime-mother-buffer, it returns original major-mode of the @@ -130,79 +139,126 @@ mother-buffer." (set-buffer mime-mother-buffer) (mime-preview-original-major-mode recursive) ) - (save-excursion - (set-buffer - (mime-entity-buffer - (get-text-property (point-min) 'mime-view-entity))) - major-mode))) + (cdr (assq 'major-mode + (get-text-property (or point + (if (> (point) (buffer-size)) + (max (1- (point-max)) (point-min)) + (point))) + 'mime-view-situation))))) ;;; @ entity information ;;; -(defun mime-entity-situation (entity) +(defun mime-entity-situation (entity &optional situation) "Return situation of ENTITY." - (append (or (mime-entity-content-type entity) - (make-mime-content-type 'text 'plain)) - (let ((d (mime-entity-content-disposition entity))) - (cons (cons 'disposition-type - (mime-content-disposition-type d)) - (mapcar (function - (lambda (param) - (let ((name (car param))) - (cons (cond ((string= name "filename") - 'filename) - ((string= name "creation-date") - 'creation-date) - ((string= name "modification-date") - 'modification-date) - ((string= name "read-date") - 'read-date) - ((string= name "size") - 'size) - (t (cons 'disposition (car param)))) - (cdr param))))) - (mime-content-disposition-parameters d)) - )) - (list (cons 'encoding (mime-entity-encoding entity)) - (cons 'major-mode - (save-excursion - (set-buffer (mime-entity-buffer entity)) - major-mode))) - )) - + (let (rest param name) + ;; Content-Type + (unless (assq 'type situation) + (setq rest (or (mime-entity-content-type entity) + (make-mime-content-type 'text 'plain)) + situation (cons (car rest) situation) + rest (cdr rest)) + ) + (unless (assq 'subtype situation) + (or rest + (setq rest (or (cdr (mime-entity-content-type entity)) + '((subtype . plain))))) + (setq situation (cons (car rest) situation) + rest (cdr rest)) + ) + (while rest + (setq param (car rest)) + (or (assoc (car param) situation) + (setq situation (cons param situation))) + (setq rest (cdr rest))) + + ;; Content-Disposition + (setq rest nil) + (unless (assq 'disposition-type situation) + (setq rest (mime-entity-content-disposition entity)) + (if rest + (setq situation (cons (cons 'disposition-type + (mime-content-disposition-type rest)) + situation) + rest (mime-content-disposition-parameters rest)) + )) + (while rest + (setq param (car rest) + name (car param)) + (if (cond ((string= name "filename") + (if (assq 'filename situation) + nil + (setq name 'filename))) + ((string= name "creation-date") + (if (assq 'creation-date situation) + nil + (setq name 'creation-date))) + ((string= name "modification-date") + (if (assq 'modification-date situation) + nil + (setq name 'modification-date))) + ((string= name "read-date") + (if (assq 'read-date situation) + nil + (setq name 'read-date))) + ((string= name "size") + (if (assq 'size situation) + nil + (setq name 'size))) + (t (setq name (cons 'disposition name)) + (if (assoc name situation) + nil + name))) + (setq situation + (cons (cons name (cdr param)) + situation))) + (setq rest (cdr rest))) + + ;; Content-Transfer-Encoding + (or (assq 'encoding situation) + (setq situation + (cons (cons 'encoding (or (mime-entity-encoding entity) + "7bit")) + situation))) + + situation)) (defun mime-view-entity-title (entity) - (or (mime-read-field 'Content-Description entity) - (mime-read-field 'Subject entity) + (or (mime-entity-read-field entity 'Content-Description) + (mime-entity-read-field entity 'Subject) (mime-entity-filename entity) "")) -(defsubst mime-raw-point-to-entity-node-id (point &optional message-info) - "Return entity-node-id from POINT in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (mime-entity-node-id (mime-raw-find-entity-from-point point message-info))) - -(defsubst mime-raw-point-to-entity-number (point &optional message-info) - "Return entity-number from POINT in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (mime-entity-number (mime-raw-find-entity-from-point point message-info))) - -(defun mime-raw-flatten-message-info (&optional message-info) - "Return list of entity in mime-raw-buffer. -If optional argument MESSAGE-INFO is not specified, -`mime-message-structure' is used." - (or message-info - (setq message-info mime-message-structure)) - (let ((dest (list message-info)) - (rcl (mime-entity-children message-info))) - (while rcl - (setq dest (nconc dest (mime-raw-flatten-message-info (car rcl)))) - (setq rcl (cdr rcl))) - dest)) +;; (defsubst mime-raw-point-to-entity-node-id (point &optional message-info) +;; "Return entity-node-id from POINT in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (mime-entity-node-id (mime-raw-find-entity-from-point point message-info))) + +;; (make-obsolete 'mime-raw-point-to-entity-node-id "don't use it.") + +;; (defsubst mime-raw-point-to-entity-number (point &optional message-info) +;; "Return entity-number from POINT in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (mime-entity-number (mime-raw-find-entity-from-point point message-info))) + +;; (make-obsolete 'mime-raw-point-to-entity-number "don't use it.") + +;; (defun mime-raw-flatten-message-info (&optional message-info) +;; "Return list of entity in mime-raw-buffer. +;; If optional argument MESSAGE-INFO is not specified, +;; `mime-message-structure' is used." +;; (or message-info +;; (setq message-info mime-message-structure)) +;; (let ((dest (list message-info)) +;; (rcl (mime-entity-children message-info))) +;; (while rcl +;; (setq dest (nconc dest (mime-raw-flatten-message-info (car rcl)))) +;; (setq rcl (cdr rcl))) +;; dest)) ;;; @ presentation of preview @@ -319,6 +375,8 @@ Each elements are regexp of field-name.") ;;; @@@ predicate function ;;; +(in-calist-package 'mime-view) + (defun mime-calist::field-match-method-as-default-rule (calist field-type field-value) (let ((s-field (assq field-type calist))) @@ -485,8 +543,12 @@ Each elements are regexp of field-name.") (defun mime-display-multipart/mixed (entity situation) (let ((children (mime-entity-children entity)) + (original-major-mode-cell (assq 'major-mode situation)) (default-situation (cdr (assq 'childrens-situation situation)))) + (if original-major-mode-cell + (setq default-situation + (cons original-major-mode-cell default-situation))) (while children (mime-display-entity (car children) nil default-situation) (setq children (cdr children)) @@ -510,12 +572,17 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (defun mime-display-multipart/alternative (entity situation) (let* ((children (mime-entity-children entity)) + (original-major-mode-cell (assq 'major-mode situation)) (default-situation (cdr (assq 'childrens-situation situation))) (i 0) (p 0) (max-score 0) - (situations + situations) + (if original-major-mode-cell + (setq default-situation + (cons original-major-mode-cell default-situation))) + (setq situations (mapcar (function (lambda (child) (let ((situation @@ -546,7 +613,7 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (setq i (1+ i)) situation) )) - children))) + children)) (setq i 0) (while children (let ((child (car children)) @@ -684,11 +751,9 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." default-situation preview-buffer) (or preview-buffer (setq preview-buffer (current-buffer))) - (let* ((raw-buffer (mime-entity-buffer entity)) - (start (mime-entity-point-min entity)) - e nb ne) - (set-buffer raw-buffer) - (goto-char start) + (let* (e nb ne nhb nbb) + (mime-goto-header-start-point entity) + (in-calist-package 'mime-view) (or situation (setq situation (or (ctree-match-calist mime-preview-condition @@ -701,7 +766,8 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (eq (cdr (assq 'header situation)) 'visible)) (header-presentation-method (or (cdr (assq 'header-presentation-method situation)) - (cdr (assq major-mode mime-header-presentation-method-alist)))) + (cdr (assq (cdr (assq 'major-mode situation)) + mime-header-presentation-method-alist)))) (body-presentation-method (cdr (assq 'body-presentation-method situation))) (children (mime-entity-children entity))) @@ -713,15 +779,18 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (mime-view-insert-entity-button entity) )) (when header-is-visible + (setq nhb (point)) (if header-presentation-method (funcall header-presentation-method entity situation) (mime-insert-header entity mime-view-ignored-field-list mime-view-visible-field-list)) + (run-hooks 'mime-display-header-hook) + (put-text-property nhb (point-max) 'mime-view-entity-header entity) (goto-char (point-max)) (insert "\n") - (run-hooks 'mime-display-header-hook) ) + (setq nbb (point)) (cond (children) ((functionp body-presentation-method) (funcall body-presentation-method entity situation) @@ -740,6 +809,8 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (setq ne (point-max)) (widen) (put-text-property nb ne 'mime-view-entity entity) + (put-text-property nb ne 'mime-view-situation situation) + (put-text-property nbb ne 'mime-view-entity-body entity) (goto-char ne) (if children (if (functionp body-presentation-method) @@ -884,21 +955,34 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (defvar mime-view-redisplay nil) +;;;###autoload (defun mime-display-message (message &optional preview-buffer - mother default-keymap-or-function) + mother default-keymap-or-function + original-major-mode) + "View MESSAGE in MIME-View mode. + +Optional argument PREVIEW-BUFFER specifies the buffer of the +presentation. It must be either nil or a name of preview buffer. + +Optional argument MOTHER specifies mother-buffer of the 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." (mime-maybe-hide-echo-buffer) - (let ((win-conf (current-window-configuration)) - (raw-buffer (mime-entity-buffer message))) + (let ((win-conf (current-window-configuration))) (or preview-buffer (setq preview-buffer - (concat "*Preview-" (buffer-name raw-buffer) "*"))) - (set-buffer raw-buffer) - (setq mime-preview-buffer preview-buffer) + (concat "*Preview-" (mime-entity-name message) "*"))) + (or original-major-mode + (setq original-major-mode + (with-current-buffer (mime-entity-header-buffer message) + major-mode))) (let ((inhibit-read-only t)) (set-buffer (get-buffer-create preview-buffer)) (widen) (erase-buffer) - (setq mime-raw-buffer raw-buffer) (if mother (setq mime-mother-buffer mother) ) @@ -906,8 +990,9 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (setq major-mode 'mime-view-mode) (setq mode-name "MIME-View") (mime-display-entity message nil - '((entity-button . invisible) - (header . visible)) + `((entity-button . invisible) + (header . visible) + (major-mode . ,original-major-mode)) preview-buffer) (mime-view-define-keymap default-keymap-or-function) (let ((point @@ -920,17 +1005,9 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (run-hooks 'mime-view-mode-hook) (set-buffer-modified-p nil) (setq buffer-read-only t) - (or (get-buffer-window preview-buffer) - (let ((r-win (get-buffer-window raw-buffer))) - (if r-win - (set-window-buffer r-win 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) - ))))) - ))) + preview-buffer))) +;;;###autoload (defun mime-view-buffer (&optional raw-buffer preview-buffer mother default-keymap-or-function representation-type) @@ -957,9 +1034,18 @@ message. It must be nil, `binary' or `cooked'. If it is nil, (if (eq representation-type 'binary) (setq representation-type 'buffer) ) - (mime-display-message - (mime-open-entity representation-type raw-buffer) - preview-buffer mother default-keymap-or-function)) + (setq preview-buffer (mime-display-message + (mime-open-entity representation-type raw-buffer) + preview-buffer mother default-keymap-or-function)) + (or (get-buffer-window preview-buffer) + (let ((r-win (get-buffer-window raw-buffer))) + (if r-win + (set-window-buffer r-win 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-mode (&optional mother ctl encoding raw-buffer preview-buffer @@ -1051,6 +1137,7 @@ It calls following-method selected from variable (let* ((p-beg (previous-single-property-change (point) 'mime-view-entity)) p-end + ph-end (entity-node-id (mime-entity-node-id entity)) (len (length entity-node-id)) ) @@ -1094,63 +1181,79 @@ It calls following-method selected from variable (setq p-end (point-max)) )) )) + (setq ph-end + (previous-single-property-change p-end 'mime-view-entity-header)) + (if (or (null ph-end) + (< ph-end p-beg)) + (setq ph-end p-beg) + ) (let* ((mode (mime-preview-original-major-mode 'recursive)) (new-name (format "%s-%s" (buffer-name) (reverse entity-node-id))) new-buf (the-buf (current-buffer)) - (a-buf mime-raw-buffer) fields) (save-excursion (set-buffer (setq new-buf (get-buffer-create new-name))) (erase-buffer) - (insert-buffer-substring the-buf p-beg p-end) + (insert-buffer-substring the-buf ph-end p-end) + (when (= ph-end p-beg) + (goto-char (point-min)) + (insert ?\n)) (goto-char (point-min)) - (let ((entity-node-id (mime-entity-node-id entity)) ci str) - (while (progn - (setq - str - (save-excursion - (set-buffer a-buf) - (setq ci - (mime-find-entity-from-node-id entity-node-id)) - (save-restriction - (narrow-to-region - (mime-entity-point-min ci) - (mime-entity-point-max ci) - ) - (std11-header-string-except - (concat "^" - (apply (function regexp-or) fields) - ":") "")))) - (if (and - (eq (mime-entity-media-type ci) 'message) - (eq (mime-entity-media-subtype ci) 'rfc822)) - nil - (if str - (insert str) - ) - entity-node-id)) + (let ((current-entity + (if (and (eq (mime-entity-media-type entity) 'message) + (eq (mime-entity-media-subtype entity) 'rfc822)) + (mime-entity-children entity) + entity)) + str) + (while (and current-entity + (progn + (setq str + (with-current-buffer + (mime-entity-header-buffer current-entity) + (save-restriction + (narrow-to-region + (mime-entity-header-start-point + current-entity) + (mime-entity-header-end-point + current-entity)) + (std11-header-string-except + (concat + "^" + (apply (function regexp-or) fields) + ":") "")))) + (if (and (eq (mime-entity-media-type + current-entity) 'message) + (eq (mime-entity-media-subtype + current-entity) 'rfc822)) + nil + (if str + (insert str) + ) + t))) (setq fields (std11-collect-field-names) - entity-node-id (cdr entity-node-id)) + current-entity (mime-entity-parent current-entity)) ) ) - (let ((rest mime-view-following-required-fields-list)) + (let ((rest mime-view-following-required-fields-list) + field-name ret) (while rest - (let ((field-name (car rest))) - (or (std11-field-body field-name) - (insert - (format - (concat field-name - ": " - (save-excursion - (set-buffer the-buf) - (set-buffer mime-mother-buffer) - (set-buffer mime-raw-buffer) - (std11-field-body field-name) - ) - "\n"))) - )) + (setq field-name (car rest)) + (or (std11-field-body field-name) + (progn + (save-excursion + (set-buffer the-buf) + (setq ret + (when mime-mother-buffer + (set-buffer mime-mother-buffer) + (mime-entity-fetch-field + (get-text-property (point) + 'mime-view-entity) + field-name)))) + (if ret + (insert (concat field-name ": " ret "\n")) + ))) (setq rest (cdr rest)) )) (mime-decode-header-in-buffer) @@ -1184,8 +1287,17 @@ If there is no upper entity, call function `mime-preview-quit'." (while (setq point (previous-single-property-change (point) 'mime-view-entity)) (goto-char point) - (if (eq r (get-text-property (point) 'mime-view-entity)) - (throw 'tag t) + (when (eq r (get-text-property (point) 'mime-view-entity)) + (if (or (eq mime-preview-move-scroll t) + (and mime-preview-move-scroll + (>= point + (save-excursion + (move-to-window-line -1) + (forward-line (* -1 next-screen-context-lines)) + (beginning-of-line) + (point))))) + (recenter next-screen-context-lines)) + (throw 'tag t) ) ) (mime-preview-quit) @@ -1196,13 +1308,25 @@ If there is no upper entity, call function `mime-preview-quit'." If there is no previous entity, it calls function registered in variable `mime-preview-over-to-previous-method-alist'." (interactive) - (while (null (get-text-property (point) 'mime-view-entity)) + (while (and (not (bobp)) + (null (get-text-property (point) 'mime-view-entity))) (backward-char) ) (let ((point (previous-single-property-change (point) 'mime-view-entity))) - (if point + (if (and point + (>= point (point-min))) (if (get-text-property (1- point) 'mime-view-entity) - (goto-char point) + (progn (goto-char point) + (if + (or (eq mime-preview-move-scroll t) + (and mime-preview-move-scroll + (<= point + (save-excursion + (move-to-window-line 0) + (forward-line next-screen-context-lines) + (end-of-line) + (point))))) + (recenter (* -1 next-screen-context-lines)))) (goto-char (1- point)) (mime-preview-move-to-previous) ) @@ -1223,11 +1347,23 @@ variable `mime-preview-over-to-next-method-alist'." (forward-char) ) (let ((point (next-single-property-change (point) 'mime-view-entity))) - (if point + (if (and point + (<= point (point-max))) (progn (goto-char point) (if (null (get-text-property point 'mime-view-entity)) (mime-preview-move-to-next) + (and + (or (eq mime-preview-move-scroll t) + (and mime-preview-move-scroll + (>= point + (save-excursion + (move-to-window-line -1) + (forward-line + (* -1 next-screen-context-lines)) + (beginning-of-line) + (point))))) + (recenter next-screen-context-lines)) )) (let ((f (assq (mime-preview-original-major-mode) mime-preview-over-to-next-method-alist))) @@ -1241,22 +1377,24 @@ variable `mime-preview-over-to-next-method-alist'." If reached to (point-max), it calls function registered in variable `mime-preview-over-to-next-method-alist'." (interactive) - (or h - (setq h (1- (window-height))) - ) - (if (= (point) (point-max)) + (if (eobp) (let ((f (assq (mime-preview-original-major-mode) - mime-preview-over-to-next-method-alist))) - (if f - (funcall (cdr f)) - )) + mime-preview-over-to-next-method-alist))) + (if f + (funcall (cdr f)) + )) (let ((point (or (next-single-property-change (point) 'mime-view-entity) - (point-max)))) - (forward-line h) - (if (> (point) point) - (goto-char point) - ) + (point-max))) + (bottom (window-end (selected-window)))) + (if (and (not h) + (> bottom point)) + (progn (goto-char point) + (recenter next-screen-context-lines)) + (condition-case nil + (scroll-up h) + (end-of-buffer + (goto-char (point-max))))) ))) (defun mime-preview-scroll-down-entity (&optional h) @@ -1264,34 +1402,40 @@ If reached to (point-max), it calls function registered in variable If reached to (point-min), it calls function registered in variable `mime-preview-over-to-previous-method-alist'." (interactive) - (or h - (setq h (1- (window-height))) - ) - (if (= (point) (point-min)) + (if (bobp) (let ((f (assq (mime-preview-original-major-mode) mime-preview-over-to-previous-method-alist))) - (if f - (funcall (cdr f)) - )) + (if f + (funcall (cdr f)) + )) (let ((point (or (previous-single-property-change (point) 'mime-view-entity) - (point-min)))) - (forward-line (- h)) - (if (< (point) point) - (goto-char point) - )))) + (point-min))) + (top (window-start (selected-window)))) + (if (and (not h) + (< top point)) + (progn (goto-char point) + (recenter (* -1 next-screen-context-lines))) + (condition-case nil + (scroll-down h) + (beginning-of-buffer + (goto-char (point-min))))) + ))) -(defun mime-preview-next-line-entity () - (interactive) - (mime-preview-scroll-up-entity 1) +(defun mime-preview-next-line-entity (&optional lines) + "Scroll up one line (or prefix LINES lines). +If LINES is negative, scroll down LINES lines." + (interactive "p") + (mime-preview-scroll-up-entity (or lines 1)) ) -(defun mime-preview-previous-line-entity () - (interactive) - (mime-preview-scroll-down-entity 1) +(defun mime-preview-previous-line-entity (&optional lines) + "Scrroll down one line (or prefix LINES lines). +If LINES is negative, scroll up LINES lines." + (interactive "p") + (mime-preview-scroll-down-entity (or lines 1)) ) - ;;; @@ quitting ;;; diff --git a/mime-w3.el b/mime-w3.el index a3d3349..6ce9927 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -1,6 +1,6 @@ ;;; mime-w3.el --- mime-view content filter for text -;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1994,1995,1996,1997,1998,1999 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Keywords: HTML, MIME, multimedia, mail, news @@ -43,7 +43,12 @@ )) (cons 'progn body))) +(defvar mime-w3-message-structure nil) + (defun mime-preview-text/html (entity situation) + (setq mime-w3-message-structure + (with-current-buffer (mime-entity-buffer entity) + mime-message-structure)) (goto-char (point-max)) (let ((p (point))) (insert "\n") @@ -53,10 +58,25 @@ (narrow-to-region p p) (mime-insert-text-content entity) (run-hooks 'mime-text-decode-hook) - (w3-region p (point-max)) + (condition-case err + (w3-region p (point-max)) + (error (message (format "%s" err)))) (mime-put-keymap-region p (point-max) w3-mode-map) )))) +(defun url-cid (url &optional proxy-info) + (let ((entity + (mime-find-entity-from-content-id (mime-uri-parse-cid url) + mime-w3-message-structure))) + (when entity + (mime-insert-entity-content entity) + (setq url-current-mime-type (mime-entity-type/subtype entity)) + ))) + +(url-register-protocol "cid" + 'url-cid + 'url-identity-expander) + ;;; @ end ;;; diff --git a/semi-def.el b/semi-def.el index 12311dd..62baefd 100644 --- a/semi-def.el +++ b/semi-def.el @@ -1,8 +1,8 @@ -;;; semi-def.el --- definition module for SEMI +;;; semi-def.el --- definition module for SEMI -*- coding: iso-8859-4; -*- -;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc. -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; Keywords: definition, MIME, multimedia, mail, news ;; This file is part of SEMI (Sample of Emacs MIME Implementation). @@ -30,7 +30,7 @@ (require 'custom) -(defconst mime-user-interface-product ["SEMI" (1 12 1) "[JR] Nonoichi"] +(defconst mime-user-interface-product ["SEMI" (1 13 7) "Awazu"] "Product name, version number and code name of MIME-kernel package.") (autoload 'mule-caesar-region "mule-caesar" -- 1.7.10.4