From 57f9c6aeeb190fe45d405b0b059445bba3d6edfd Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 18 Oct 1998 21:31:08 +0000 Subject: [PATCH] * Sync up to flim-1_11_0 from flim-1_10_5. * mime-def.el (mime-library-product): Bump up to FLAM-DOODLE 1.11.0. --- ChangeLog | 129 +++++++++++++++++++++++++++++++++++++++ DOODLE-VERSION | 2 +- FLIM-ELS | 2 +- FLIM-MK | 7 ++- FLIM-VERSION | 10 +++- Makefile | 2 +- README.en | 4 +- eword-decode.el | 16 ++++- mel-g.el | 3 +- mime-def.el | 180 +++++++++++++++++++++++++++++++++++-------------------- mime-en.sgml | 38 +++++++++--- mime-en.texi | 48 +++++++++++---- mime-ja.sgml | 39 ++++++++---- mime-ja.texi | 44 ++++++++++---- mime-parse.el | 3 + mime.el | 80 ++++++++++++++++--------- mmbuffer.el | 86 ++------------------------ mmcooked.el | 19 +++++- mmgeneric.el | 40 +++++-------- std11.el | 16 ++--- 20 files changed, 503 insertions(+), 265 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad8faa6..35b2494 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-10-18 Tanaka Akira + + * Sync up to flim-1_11_0 from flim-1_10_5. + + * mime-def.el (mime-library-product): Bump up to FLAM-DOODLE + 1.11.0. + 1998-10-17 Tanaka Akira * mel-ccl.el: Check broken facility consistency by @@ -1212,6 +1219,128 @@ * eword-decode.el: Copied from AKEMI branch of SEMI. +1998-10-18 MORIOKA Tomohiko + + * FLIM: Version 1.11.0 (Yamadagawa) was released. + +1998-10-17 MORIOKA Tomohiko + + * mime-ja.sgml, mime-en.sgml (entity formatting): Add description + about `mime-insert-text-content'. + +1998-10-17 MORIOKA Tomohiko + + * mime-ja.sgml, mime-en.sgml (entity formatting): New node; move + `mime-insert-header' from `Entity-header'; move + `default-mime-charset' from `custom'. + +1998-10-17 MORIOKA Tomohiko + + * mime-en.sgml, mime-ja.sgml (Entity-header): Generic function + `mime-insert-decoded-header' was renamed to `mime-insert-header'. + +1998-10-17 MORIOKA Tomohiko + + * NEWS: New file. + +1998-10-16 MORIOKA Tomohiko + + * mime.el (mime-insert-header): Renamed from + `mime-insert-decoded-header'; define `mime-insert-decoded-header' + as an obsolete alias. + + * mmgeneric.el, mmcooked.el (insert-header): Renamed from + `insert-decoded-header'. + + * README.en (Installation): Add required version of APEL. + +1998-10-16 MORIOKA Tomohiko + + * mel-g.el: Require mel. + + * mel-g.el: Require poem instead of emu. + +1998-10-16 MORIOKA Tomohiko + + * mime.el (mime-insert-text-content): New generic function. + + * mmcooked.el, mmgeneric.el (insert-text-content): New method. + +1998-10-02 MORIOKA Tomohiko + + * std11.el (std11-unfold-string): New implementation. + +1998-10-02 MORIOKA Tomohiko + + * mmgeneric.el: New module. + + * mmbuffer.el: Use `generic' as mother backend. + + * FLIM-ELS (flim-modules): Add mmgeneric. + +1998-10-01 MORIOKA Tomohiko + + * mime-parse.el (mime-parse-message): Modify for + `make-mime-entity-internal'. + + * mime-def.el (make-mime-entity-internal): Change interface to be + able to specify original-header and parsed-header. + +1998-09-30 MORIOKA Tomohiko + + * eword-decode.el (eword-decode-and-unfold-unstructured-field): + New function. + +1998-09-30 MORIOKA Tomohiko + + * mime.el (mime-entity-content-type): New implementation. + (mime-entity-content-disposition): New implementation. + (mime-entity-encoding): New implementation. + + * mime.el (mime-fetch-field): Refer internal slots for Date, + Message-Id and References fields. + + * mime-parse.el (mime-parse-message): Modify for + `make-mime-entity-internal'. + + * mime-def.el: Change `mime-entity-*-internal' and + `mime-entity-set-*-internal' to macro. + (make-mime-entity-internal): Change interface and data format for + NOV data; changed to macro. + (mime-entity-set-location-internal): New macro. + (mime-entity-decoded-subject-internal): New macro. + (mime-entity-set-decoded-subject-internal): New macro. + (mime-entity-decoded-from-internal): New macro. + (mime-entity-set-decoded-from-internal): New macro. + (mime-entity-date-internal): New macro. + (mime-entity-set-date-internal): New macro. + (mime-entity-message-id-internal): New macro. + (mime-entity-set-message-id-internal): New macro. + (mime-entity-references-internal): New macro. + (mime-entity-set-references-internal): New macro. + (mime-entity-chars-internal): New macro. + (mime-entity-set-chars-internal): New macro. + (mime-entity-lines-internal): New macro. + (mime-entity-set-lines-internal): New macro. + (mime-entity-xref-internal): New macro. + (mime-entity-set-xref-internal): New macro. + (mime-entity-original-header-internal): Modify for new structure; + changed to macro. + (mime-entity-set-original-header-internal): Likewise. + (mime-entity-parsed-header-internal): Likewise. + (mime-entity-set-parsed-header-internal): Likewise. + (mime-entity-buffer-internal): Likewise. + (mime-entity-set-buffer-internal): Likewise. + (mime-entity-header-start-internal): Likewise. + (mime-entity-set-header-start-internal): Likewise. + (mime-entity-header-end-internal): Likewise. + (mime-entity-set-header-end-internal): Likewise. + (mime-entity-body-start-internal): Likewise. + (mime-entity-set-body-start-internal): Likewise. + (mime-entity-body-end-internal): Likewise. + (mime-entity-set-body-end-internal): Likewise. + + 1998-10-14 MORIOKA Tomohiko * FLIM: Version 1.10.5 (Kizugawadai) was released. diff --git a/DOODLE-VERSION b/DOODLE-VERSION index 2045ad2..c23bbc2 100644 --- a/DOODLE-VERSION +++ b/DOODLE-VERSION @@ -22,7 +22,7 @@ Order is not significant. 16 $B4;;R(B $B$3$&$8(B 7.5YR7.0/11.0 FLAM-DOODLE 1.10.0 17 $B5`MU(B $B$/$A$P(B 10YR7.5/10.0 FLAM-DOODLE 1.10.1 18 $B@VGrFK(B $B$"$+$7$m$D$k$P$_(B 5.0YR8.0/6.0 FLAM-DOODLE 1.10.2 - 19 $B>.F&(B $B$"$:$-(B 2.5R3.5/5.0 + 19 $B>.F&(B $B$"$:$-(B 2.5R3.5/5.0 FLAM-DOODLE 1.11.0 20 $BIrF:Cc(B $B$($S$A$c(B 5.0R4.0/11.0 21 $B?? JR $(BJRD.@~(B $(B=K1`(B 1.10.5 Kizugawadai $(BLZDE@nBf(B ------ Yamadagawa $(B;3ED@n(B +1.11.0 Yamadagawa $(B;3ED@n(B ----- Takanohara $(B9b$N86(B ----- Heij-Dò-A $(BJ?>k(B ----- Saidaiji $(B@>Bg;{(B @@ -59,4 +59,10 @@ 1.7.0 Goj-Dò-A $(B8^>r(B 1.8.0 Shij-Dò-A $(B;M>r(B ; <=> $(B:e5^(B $(B5~ET@~(B 1.9.0 Karasuma Oike $(B1(4]8fCS(B ; = $(B5~ET;T8rDL6I(B $(BEl@>@~(B ------ Marutamach $(B4]B@D.(B +1.10.0 Marutamach $(B4]B@D.(B +1.11.0 Imadegawa $(B:#=P@n(B +1.11.1 Kuramaguchi $(B0HGO8}(B +1.11.2 Kita-Dòji-A $(BKLBgO)(B +1.11.3 Kitayama $(BKL;3(B +1.11.4 Matugasaki $(B>>%v:j(B +1.11.5 Kokusaikaikan $(B9q:]2q4[(B diff --git a/Makefile b/Makefile index 6cc57d9..c1fd0e4 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # PACKAGE = flim -VERSION = 1.10.5 +VERSION = 1.11.0 TAR = tar RM = /bin/rm -f diff --git a/README.en b/README.en index 4dce259..004fbe3 100644 --- a/README.en +++ b/README.en @@ -36,8 +36,8 @@ What's FLIM Installation ============ -(0) before installing it, please install APEL package. APEL package - is available at: +(0) before installing it, please install APEL (9.4 or later) package. + APEL package is available at: ftp://ftp.jaist.ac.jp/pub/GNU/elisp/apel/ diff --git a/eword-decode.el b/eword-decode.el index 42beb16..f176a48 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -407,6 +407,19 @@ such as a version of Net$cape)." (let ((decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string)))) (ew-crlf-to-lf (ew-crlf-unfold decoded)))) +(defun eword-decode-and-unfold-unstructured-field (string) + "Decode and unfold STRING as unstructured field body. +It decodes non us-ascii characters in FULL-NAME encoded as +encoded-words or invalid \"raw\" string. \"Raw\" non us-ascii +characters are regarded as variable `default-mime-charset'. + +If an encoded-word is broken or your emacs implementation can not +decode the charset included in it, it is not decoded." + (rotate-memo args-eword-decode-and-unfold-unstructured-field + (list string)) + (let ((decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string)))) + (ew-crlf-to-lf (ew-crlf-unfold decoded)))) + ;;; @ for region ;;; @@ -690,8 +703,7 @@ be the result." (cdr decoded))))))) (defun eword-analyze-atom (string &optional must-unfold) - (if (let ((enable-multibyte-characters nil)) - (string-match std11-atom-regexp string)) + (if (string-match std11-atom-regexp (string-as-unibyte string)) (let ((end (match-end 0))) (if (and eword-decode-sticked-encoded-word (string-match eword-encoded-word-in-phrase-regexp diff --git a/mel-g.el b/mel-g.el index bc2c510..8be016c 100644 --- a/mel-g.el +++ b/mel-g.el @@ -33,8 +33,9 @@ ;;; Code: -(require 'emu) +(require 'poem) (require 'path-util) +(require 'mel) ;;; @ variables diff --git a/mime-def.el b/mime-def.el index 2444b42..a952121 100644 --- a/mime-def.el +++ b/mime-def.el @@ -25,7 +25,7 @@ ;;; Code: (eval-and-compile - (defconst mime-library-product ["FLAM-DOODLE" (1 10 2) "$B@VGrFK(B 5.0YR8.0/6.0"] + (defconst mime-library-product ["FLAM-DOODLE" (1 11 0) "$B>.F&(B 2.5R3.5/5.0"] "Product name, version number and code name of MIME-library package.") ) @@ -214,75 +214,125 @@ ;;; @ MIME entity ;;; -(defsubst make-mime-entity-internal (representation-type location +(defmacro make-mime-entity-internal (representation-type location &optional content-type children parent node-id + ;; for NOV + decoded-subject decoded-from + date message-id references + chars lines + xref + ;; for other fields + original-header parsed-header + ;; for buffer representation buffer header-start header-end body-start body-end) - (vector representation-type location - content-type nil nil children parent node-id - buffer header-start header-end body-start body-end - nil nil)) - -(defsubst mime-entity-representation-type-internal (entity) - (aref entity 0)) -(defsubst mime-entity-set-representation-type-internal (entity type) - (aset entity 0 type)) -(defsubst mime-entity-location-internal (entity) - (aref entity 1)) - -(defsubst mime-entity-content-type-internal (entity) - (aref entity 2)) -(defsubst mime-entity-set-content-type-internal (entity type) - (aset entity 2 type)) -(defsubst mime-entity-content-disposition-internal (entity) - (aref entity 3)) -(defsubst mime-entity-set-content-disposition-internal (entity disposition) - (aset entity 3 disposition)) -(defsubst mime-entity-encoding-internal (entity) - (aref entity 4)) -(defsubst mime-entity-set-encoding-internal (entity encoding) - (aset entity 4 encoding)) - -(defsubst mime-entity-children-internal (entity) - (aref entity 5)) -(defsubst mime-entity-set-children-internal (entity children) - (aset entity 5 children)) -(defsubst mime-entity-parent-internal (entity) - (aref entity 6)) -(defsubst mime-entity-node-id-internal (entity) - (aref entity 7)) - -(defsubst mime-entity-buffer-internal (entity) - (aref entity 8)) -(defsubst mime-entity-set-buffer-internal (entity buffer) - (aset entity 8 buffer)) -(defsubst mime-entity-header-start-internal (entity) - (aref entity 9)) -(defsubst mime-entity-set-header-start-internal (entity point) - (aset entity 9 point)) -(defsubst mime-entity-header-end-internal (entity) - (aref entity 10)) -(defsubst mime-entity-set-header-end-internal (entity point) - (aset entity 10 point)) -(defsubst mime-entity-body-start-internal (entity) - (aref entity 11)) -(defsubst mime-entity-set-body-start-internal (entity point) - (aset entity 11 point)) -(defsubst mime-entity-body-end-internal (entity) - (aref entity 12)) -(defsubst mime-entity-set-body-end-internal (entity point) - (aset entity 12 point)) - -(defsubst mime-entity-original-header-internal (entity) - (aref entity 13)) -(defsubst mime-entity-set-original-header-internal (entity header) - (aset entity 13 header)) -(defsubst mime-entity-parsed-header-internal (entity) - (aref entity 14)) -(defsubst mime-entity-set-parsed-header-internal (entity header) - (aset entity 14 header)) + `(vector ,representation-type ,location + ,content-type nil nil ,children ,parent ,node-id + ;; for NOV + ,decoded-subject ,decoded-from + ,date ,message-id ,references + ,chars ,lines + ,xref + ;; for other fields + ,original-header ,parsed-header + ;; for buffer representation + ,buffer ,header-start ,header-end ,body-start ,body-end)) + +(defmacro mime-entity-representation-type-internal (entity) + `(aref ,entity 0)) +(defmacro mime-entity-set-representation-type-internal (entity type) + `(aset ,entity 0 ,type)) +(defmacro mime-entity-location-internal (entity) + `(aref ,entity 1)) +(defmacro mime-entity-set-location-internal (entity location) + `(aset ,entity 1 ,location)) + +(defmacro mime-entity-content-type-internal (entity) + `(aref ,entity 2)) +(defmacro mime-entity-set-content-type-internal (entity type) + `(aset ,entity 2 ,type)) +(defmacro mime-entity-content-disposition-internal (entity) + `(aref ,entity 3)) +(defmacro mime-entity-set-content-disposition-internal (entity disposition) + `(aset ,entity 3 ,disposition)) +(defmacro mime-entity-encoding-internal (entity) + `(aref ,entity 4)) +(defmacro mime-entity-set-encoding-internal (entity encoding) + `(aset ,entity 4 ,encoding)) + +(defmacro mime-entity-children-internal (entity) + `(aref ,entity 5)) +(defmacro mime-entity-set-children-internal (entity children) + `(aset ,entity 5 ,children)) +(defmacro mime-entity-parent-internal (entity) + `(aref ,entity 6)) +(defmacro mime-entity-node-id-internal (entity) + `(aref ,entity 7)) + +(defmacro mime-entity-decoded-subject-internal (entity) + `(aref ,entity 8)) +(defmacro mime-entity-set-decoded-subject-internal (entity subject) + `(aset ,entity 8 ,subject)) +(defmacro mime-entity-decoded-from-internal (entity) + `(aref ,entity 9)) +(defmacro mime-entity-set-decoded-from-internal (entity from) + `(aset ,entity 9 ,from)) +(defmacro mime-entity-date-internal (entity) + `(aref ,entity 10)) +(defmacro mime-entity-set-date-internal (entity date) + `(aset ,entity 10 ,date)) +(defmacro mime-entity-message-id-internal (entity) + `(aref ,entity 11)) +(defmacro mime-entity-set-message-id-internal (entity message-id) + `(aset ,entity 11 ,message-id)) +(defmacro mime-entity-references-internal (entity) + `(aref ,entity 12)) +(defmacro mime-entity-set-references-internal (entity references) + `(aset ,entity 12 ,references)) +(defmacro mime-entity-chars-internal (entity) + `(aref ,entity 13)) +(defmacro mime-entity-set-chars-internal (entity chars) + `(aset ,entity 13 ,chars)) +(defmacro mime-entity-lines-internal (entity) + `(aref ,entity 14)) +(defmacro mime-entity-set-lines-internal (entity lines) + `(aset ,entity 14 ,lines)) +(defmacro mime-entity-xref-internal (entity) + `(aref ,entity 15)) +(defmacro mime-entity-set-xref-internal (entity xref) + `(aset ,entity 15 ,xref)) + +(defmacro mime-entity-original-header-internal (entity) + `(aref ,entity 16)) +(defmacro mime-entity-set-original-header-internal (entity header) + `(aset ,entity 16 ,header)) +(defmacro mime-entity-parsed-header-internal (entity) + `(aref ,entity 17)) +(defmacro mime-entity-set-parsed-header-internal (entity header) + `(aset ,entity 17 ,header)) + +(defmacro mime-entity-buffer-internal (entity) + `(aref ,entity 18)) +(defmacro mime-entity-set-buffer-internal (entity buffer) + `(aset ,entity 18 ,buffer)) +(defmacro mime-entity-header-start-internal (entity) + `(aref ,entity 19)) +(defmacro mime-entity-set-header-start-internal (entity point) + `(aset ,entity 19 ,point)) +(defmacro mime-entity-header-end-internal (entity) + `(aref ,entity 20)) +(defmacro mime-entity-set-header-end-internal (entity point) + `(aset ,entity 20 ,point)) +(defmacro mime-entity-body-start-internal (entity) + `(aref ,entity 21)) +(defmacro mime-entity-set-body-start-internal (entity point) + `(aset ,entity 21 ,point)) +(defmacro mime-entity-body-end-internal (entity) + `(aref ,entity 22)) +(defmacro mime-entity-set-body-end-internal (entity point) + `(aset ,entity 22 ,point)) ;;; @ message structure diff --git a/mime-en.sgml b/mime-en.sgml index 1aeb63c..2523585 100644 --- a/mime-en.sgml +++ b/mime-en.sgml @@ -264,7 +264,11 @@ If field-name field is not found, this function returns nil. - + +

Text presentation of entity + entity formatting +

+ entity invisible-fields visible-fields

Insert before point a decoded contents of header of entity. @@ -276,8 +280,32 @@ field-name to hide. If a field-name is matched with some elements of invisible-fields and matched with none of visible-fields, this function don't insert the field. +

+Each encoded-word in the header is decoded. ``Raw non +us-ascii characters'' are also decoded as +default-mime-charset. + + entity +

+Insert before point a contents of entity as text entity. +

+Contents of the entity are decoded as MIME +charset. If the entity does not have charset +parameter of Content-Type field, default-mime-charset is +used as default value. + + + +

+Symbol to indicate default value of MIME-charset. +

+It is used when MIME-charset is not specified. +

+It is originally variable of APEL. + +

Contents of Entity Entity-content @@ -857,14 +885,6 @@ MIME $B4XO"5!G=$K4X$9$k(B group. mail $B$H(B news $B$KB0$9$k!#(B - -

-$BE,@Z$J(B MIME charset $B$,8+$D$+$i$J$+$C$?>l9g$KMQ$$$i$l$k(B -MIME charset. -

-$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B - -

MIME $B5!G=$K4X$9$kl9g$KMQ$$$i(B -$B$l$k(BMIME charset.@refill - -$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B -@end defvar - - @defvar mime-temp-directory MIME $B5!G=$K4X$9$kfield-name $BMs$,B8:_$7$J$$>l9g$O(B nil $B$rJV$9!#(B - + +

Entity $B$NJ8;zI=8=(B + entity formatting +

+ entity invisible-fields visible-fields

$B8=:_0LCV$K(B entity $B$NI|9f$7$?(B header $B$rA^F~$9$k!#(B @@ -273,9 +277,32 @@ list $B$G!"$=$l$>$l!"I=<($7$?$/$J$$(B field $BL>$HI=<($7$?$$MsL>$rI=8=$7$?$b$ $B$G$"$k!#(B

invisible-fields $B$NMWAG$N$I$l$+$K(B match $B$7!"$+$D!"(B -visible-fields $B$NMWAG$N$I$l$K$b(B match $B$7$J$$Ms$OI=<($5$l$J$$!#(B +visible-fields $B$NMWAG$N$I$l$K$b(B match $B$7$J$$Ms$OI=<($5$l$J(B +$B$$!#(B +

+encoded-word $B$OI|9f$5$l$k!#!X@8$NHs(B us-ascii $BJ8;z!Y$O(B +default-mime-charset $B$H$7$F2r + + + entity +

+Insert before point a contents of entity as text entity. +

+Contents of the entity are decoded as MIME +charset. If the entity does not have charset +parameter of Content-Type field, default-mime-charset is +used as default value. + +

+$BE,@Z$J(B MIME charset $B$,8+$D$+$i$J$+$C$?>l9g$KMQ$$$i$l$k(B +MIME charset. +

+$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B + +

Entity $B$NFbMF(B Entity-content @@ -853,14 +880,6 @@ MIME $B4XO"5!G=$K4X$9$k(B group. mail $B$H(B news $B$KB0$9$k!#(B - -

-$BE,@Z$J(B MIME charset $B$,8+$D$+$i$J$+$C$?>l9g$KMQ$$$i$l$k(B -MIME charset. -

-$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B - -

MIME $B5!G=$K4X$9$kpJs$rI=8=$9$k$?$a$K(B@strong{mime-entity} $B9=(B * Entity hierarchy:: Entity $B3,AX(B * Entity Attributes:: Entity $B$NB0@-(B * Entity-header:: Entity header $B$N>pJs(B +* entity formatting:: Entity $B$NJ8;zI=8=(B * Entity-content:: Entity $B$NFbMF(B * Entity buffer:: Entity $B$N(B buffer $B$K$h$kI=8=(B * mm-backend:: Entity $B$NI=8=$HpJs(B @defun mime-fetch-field field-name &optional entity @@ -292,7 +294,11 @@ code-converted. @end defun -@defun mime-insert-decoded-header entity &optional invisible-fields visible-fields + +@node entity formatting, Entity-content, Entity-header, Entity +@section Entity $B$NJ8;zI=8=(B + +@defun mime-insert-header entity &optional invisible-fields visible-fields $B8=:_0LCV$K(B @var{entity} $B$NI|9f$7$?(B header $B$rA^F~$9$k!#(B@refill @@ -302,11 +308,34 @@ code-converted. @var{invisible-fields} $B$NMWAG$N$I$l$+$K(B match $B$7!"$+$D!"(B @var{visible-fields} $B$NMWAG$N$I$l$K$b(B match $B$7$J$$Ms$OI=<($5$l$J$$!#(B +@refill + +encoded-word (@ref{encoded-word}) $B$OI|9f$5$l$k!#!X@8$NHs(B us-ascii $BJ8;z!Y(B +$B$O(B @code{default-mime-charset} $B$H$7$F2rl9g$KMQ$$$i(B +$B$l$k(BMIME charset.@refill + +$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B +@end defvar + + + +@node Entity-content, Entity buffer, entity formatting, Entity @section Entity $B$NFbMF(B @defun mime-entity-content entity @@ -949,15 +978,6 @@ MIME $B4XO"5!G=$K4X$9$k(B group.@refill @end deffn -@defvar default-mime-charset - -$BE,@Z$J(B MIME charset (@ref{MIME charset}) $B$,8+$D$+$i$J$+$C$?>l9g$KMQ$$$i(B -$B$l$k(BMIME charset.@refill - -$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B -@end defvar - - @defvar mime-temp-directory MIME $B5!G=$K4X$9$k