From: morioka Date: Wed, 24 Jun 1998 06:01:55 +0000 (+0000) Subject: Sync up with flim-1_6_0. X-Git-Tag: chao-199811302358 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fchao;p=elisp%2Fflim.git Sync up with flim-1_6_0. --- diff --git a/ChangeLog b/ChangeLog index 33a9da0..1c9024c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,162 @@ +1998-06-24 MORIOKA Tomohiko + + * FLIM: Version 1.6.0 (Ogura) was released. + + * mime-ja.sgml (Entity Attributes): New section. + + * mime-ja.sgml (Entity as node in message): Add description of + `mime-find-entity-from-number' and + `mime-find-entity-from-node-id'. + + * mime.el (mime-find-entity-from-number): New function. + (mime-find-entity-from-node-id): New function. + (mime-entity-parent): New function (moved from SEMI MIME-View). + (mime-entity-uu-filename): New function (moved from SEMI + MIME-View). + (mime-entity-filename): New function (moved from SEMI MIME-View). + + * mime-def.el (mime-uuencode-encoding-name-list): New variable. + +1998-06-24 MORIOKA Tomohiko + + * mime-ja.sgml: Modify for FLIM 1.6. + + * mime.el (mime-fetch-field): New function; abolish + `mime-entity-fetch-field'. + (mime-read-field): New function; abolish `mime-entity-read-field'. + +1998-06-23 MORIOKA Tomohiko + + * mime-ja.sgml, mime-ja.texi: New files. + +1998-06-22 Shuhei KOBAYASHI + + * mime-parse.el (mime-parse-message): Would error if empty body. + + +1998-06-22 MORIOKA Tomohiko + + * FLIM: Version 1.5.0 (Mukaijima) was released. + +1998-06-21 MORIOKA Tomohiko + + * README.en (What's FLIM): Modify for mime.el. + + * FLIM-ELS (flim-modules): Add `mime'. + + * mime-lib.el: Move every definitions to mime.el. + + * mime.el: New module (renamed from mime-lib.el). + +1998-06-21 MORIOKA Tomohiko + + * mime-lib.el: Add autoload setting for eword-encode.el. + + * mime-lib.el (mime-entity-content): New function. + +1998-06-20 MORIOKA Tomohiko + + * mel.el: Abolish constant `mel-version'. + + * mel.el (mime-string-decoding-method-alist): New variable. + (mime-decode-string): New function. + +1998-06-20 MORIOKA Tomohiko + + * mel-b.el (base64-external-decode-string): New function. + (base64-decode-string): New function. + +1998-06-20 MORIOKA Tomohiko + + * mel-q.el (quoted-printable-decode-string): New implementation. + +1998-06-20 MORIOKA Tomohiko + + * mel-q.el (quoted-printable-internal-decode-region): New + implementation. + +1998-06-20 MORIOKA Tomohiko + + * mel-q.el (q-encoding-decode-string): Use + `quoted-printable-hex-char-to-num'. + + * mel-q.el (quoted-printable-hex-char-to-num): New function. + (quoted-printable-decode-string): Use + `quoted-printable-hex-char-to-num'. + +1998-06-19 MORIOKA Tomohiko + + * mime-def.el, mime-parse.el: Move `mime-message-structure' from + mime-parse.el to mime-def.el. + +1998-06-19 MORIOKA Tomohiko + + * mime-lib.el, mime-parse.el: Move `mime-root-entity-p' from + mime-parse.el to mime-lib.el. + + * mime-lib.el: Add autoload setting for mime-parse.el. + +1998-06-19 MORIOKA Tomohiko + + * mime-parse.el, mime-def.el: Move `mime-entity-point-min', + `mime-entity-point-max', `mime-entity-media-type', + `mime-entity-media-subtype', `mime-entity-parameters' and + `mime-entity-type/subtype' from mime-parse.el to mime-def.el. + + * mime-parse.el, mime-def.el: Move `mime-content-disposition' + reference functions from mime-parse.el to mime-def.el. + + * mime-parse.el, mime-def.el: Move structure `mime-content-type' + from mime-parse.el to mime-def.el. + +1998-06-19 MORIOKA Tomohiko + + * mel-b.el (base64-internal-decode-string): Renamed from + `base64-decode-string'. + (base64-decode-string): New alias for + `base64-internal-decode-string'. + +1998-06-19 MORIOKA Tomohiko + + * mel-b.el (base64-decode-unit): New function; abolish + `base64-decode-1'. + (base64-decode-string): New implementation. + (base64-internal-decode-region): New implementation. + +1998-06-19 MORIOKA Tomohiko + + * mime-parse.el (mime-message-structure): New variable. + (mime-parse-buffer): New function. + +1998-06-19 Shuhei KOBAYASHI + + * mime-def.el: Require 'cl when it is compiled. + + * mime-lib.el (mime-entity-read-field): Fix typo. + Use `eword-decode-ignored-field-list'. + + * mime-parse.el (mime-parse-multipart): Fix typo. + (mime-parse-message): Parse message/external-body. + + +1998-06-19 MORIOKA Tomohiko + + * FLIM: Version 1.4.1 (Momoyama-Gory-Dòmae)-A was released. + +1998-06-18 MORIOKA Tomohiko + + * eword-decode.el (mime-insert-decoded-header): Fix typo. + + +1998-06-18 MORIOKA Tomohiko + + * FLIM: Version 1.4.0 (Kintetsu-Tanbabashi) was released. + +1998-06-18 MORIOKA Tomohiko + + * README.en (What's FLIM): Add description about mime-lib.el and + mime-parse.el. + 1998-06-17 MORIOKA Tomohiko * mime-parse.el: Require 'cl when it is compiled. diff --git a/FLIM-ELS b/FLIM-ELS index a5a4034..cce9000 100644 --- a/FLIM-ELS +++ b/FLIM-ELS @@ -8,7 +8,8 @@ mime-def mel mel-dl mel-b mel-q mel-u mel-g eword-decode eword-encode - mime-lib mime-parse mailcap)) + mime mime-parse mailcap + mime-lib)) (if (fboundp 'dynamic-link) (setq flim-modules (cons 'mel-dl flim-modules)) diff --git a/FLIM-VERSION b/FLIM-VERSION index b2317e4..dea1db1 100644 --- a/FLIM-VERSION +++ b/FLIM-VERSION @@ -12,7 +12,10 @@ 1.2.1 Kamitobaguchi $(B>eD;1)8}(B 1.2.2 Takeda $(BC]ED(B ; = $(B5~ET;T8rDL6I(B $(B1(4]@~(B 1.3.0 Fushimi $(BIz8+(B -1.3.1 Kintetsu-Tanbabashi $(B6aE4C0GH66(B +1.4.0 Kintetsu-Tanbabashi $(B6aE4C0GH66(B ; <=> $(B5~:e(B $(BC0GH66(B +1.4.1 Momoyama-Gory-Dòmae-A $(BEm;38fNMA0(B +1.5.0 Mukaijima $(B8~Eg(B +1.6.0 Ogura $(B>.AR(B [Chao Version names] @@ -26,3 +29,4 @@ 1.2.0 Takeda $(BC]ED(B ; = $(B6aE4(B $(B5~ET@~(B 1.3.0 Kuinabashi $(B$/$$$J66(B 1.4.0 J-Dþjò-A $(B==>r(B +1.6.0 Kuj-Dò-A $(B6e>r(B diff --git a/Makefile b/Makefile index 00e3361..efaf8be 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Makefile for FLIM. # -VERSION = 1.3.0 +VERSION = 1.6.0 TAR = tar RM = /bin/rm -f diff --git a/README.en b/README.en index d7c06e1..195ab83 100644 --- a/README.en +++ b/README.en @@ -9,19 +9,20 @@ What's FLIM std11.el --- STD 11 (RFC 822) parser and utility - mime-def.el --- Definitions about MIME format - - MEL: MIME encoder/decoder - mel.el --- main module - mel-dl.el --- base64 (b-encoding) encoder/decoder - (for Emacs 20 with dynamic loading support) - mel-b.el --- base64 (b-encoding) encoder/decoder - (for other emacsen) - mel-q.el --- quoted-printable and q-encoding encoder/decoder - mel-u.el --- unofficial module for uuencode - mel-g.el --- unofficial module for gzip64 - - eword: encoded-word encoder/decoder + mime.el --- MIME library + + mime-def.el --- Definitions about MIME format + + mime-parse.el --- MIME parser + + mel.el --- MIME encoder/decoder + mel-dl.el --- base64 (b-encoding) encoder/decoder + (for Emacs 20 with dynamic loading support) + mel-b.el --- base64 (b-encoding) encoder/decoder + (for other emacsen) + mel-q.el --- quoted-printable and q-encoding encoder/decoder + mel-u.el --- unofficial module for uuencode + mel-g.el --- unofficial module for gzip64 eword-decode.el --- encoded-word decoder eword-encode.el --- encoded-word encoder diff --git a/mime-def.el b/mime-def.el index bd63c7c..64f56a1 100644 --- a/mime-def.el +++ b/mime-def.el @@ -24,7 +24,7 @@ ;;; Code: -(defconst mime-library-version-string "Chao 1.4.0 - \"J,D~(Bj,Dr(B\"") +(defconst mime-library-version-string "Chao 1.6.0 - \"Kuj,Dr(B\"") ;;; @ variables @@ -32,6 +32,8 @@ (require 'custom) +(eval-when-compile (require 'cl)) + (defgroup mime nil "Emacs MIME Interfaces" :group 'news @@ -50,6 +52,11 @@ :group 'mime :type 'directory) +(defcustom mime-uuencode-encoding-name-list '("x-uue" "x-uuencode") + "*List of encoding names for uuencode format." + :group 'mime + :type '(repeat string)) + ;;; @ required functions ;;; @@ -93,8 +100,7 @@ (defconst std11-quoted-string-regexp (concat "\"" (regexp-* - (regexp-or std11-qtext-regexp std11-quoted-pair-regexp) - ) + (regexp-or std11-qtext-regexp std11-quoted-pair-regexp)) "\"")) @@ -119,7 +125,61 @@ "][" quoted-printable-hex-chars "]")) -;;; @ MIME-entity +;;; @ Content-Type +;;; + +(defsubst make-mime-content-type (type subtype &optional parameters) + (list* (cons 'type type) + (cons 'subtype subtype) + (nreverse parameters)) + ) + +(defsubst mime-content-type-primary-type (content-type) + "Return primary-type of CONTENT-TYPE." + (cdr (car content-type))) + +(defsubst mime-content-type-subtype (content-type) + "Return primary-type of CONTENT-TYPE." + (cdr (cadr content-type))) + +(defsubst mime-content-type-parameters (content-type) + "Return primary-type of CONTENT-TYPE." + (cddr content-type)) + +(defsubst mime-content-type-parameter (content-type parameter) + "Return PARAMETER value of CONTENT-TYPE." + (cdr (assoc parameter (mime-content-type-parameters content-type)))) + + +(defsubst mime-type/subtype-string (type &optional subtype) + "Return type/subtype string from TYPE and SUBTYPE." + (if type + (if subtype + (format "%s/%s" type subtype) + (format "%s" type)))) + + +;;; @ Content-Disposition +;;; + +(defsubst mime-content-disposition-type (content-disposition) + "Return disposition-type of CONTENT-DISPOSITION." + (cdr (car content-disposition))) + +(defsubst mime-content-disposition-parameters (content-disposition) + "Return disposition-parameters of CONTENT-DISPOSITION." + (cdr content-disposition)) + +(defsubst mime-content-disposition-parameter (content-disposition parameter) + "Return PARAMETER value of CONTENT-DISPOSITION." + (cdr (assoc parameter (cdr content-disposition)))) + +(defsubst mime-content-disposition-filename (content-disposition) + "Return filename of CONTENT-DISPOSITION." + (mime-content-disposition-parameter content-disposition "filename")) + + +;;; @ MIME entity ;;; (defsubst make-mime-entity (buffer @@ -152,16 +212,46 @@ (defsubst mime-entity-number (entity) (reverse (mime-entity-node-id entity))) +(defalias 'mime-entity-point-min 'mime-entity-header-start) +(defalias 'mime-entity-point-max 'mime-entity-body-end) + +(defsubst mime-entity-media-type (entity) + (mime-content-type-primary-type (mime-entity-content-type entity))) +(defsubst mime-entity-media-subtype (entity) + (mime-content-type-subtype (mime-entity-content-type entity))) +(defsubst mime-entity-parameters (entity) + (mime-content-type-parameters (mime-entity-content-type entity))) + +(defsubst mime-entity-type/subtype (entity-info) + (mime-type/subtype-string (mime-entity-media-type entity-info) + (mime-entity-media-subtype entity-info))) + -;;; @ utility +;;; @ message structure ;;; -(defsubst mime-type/subtype-string (type &optional subtype) - "Return type/subtype string from TYPE and SUBTYPE." - (if type - (if subtype - (format "%s/%s" type subtype) - (format "%s" type)))) +(defvar mime-message-structure nil + "Information about structure of message. +Please use reference function `mime-entity-SLOT' to get value of SLOT. + +Following is a list of slots of the structure: + +buffer buffer includes this entity (buffer). +node-id node-id (list of integers) +header-start minimum point of header in raw-buffer +header-end maximum point of header in raw-buffer +body-start minimum point of body in raw-buffer +body-end maximum point of body in raw-buffer +content-type content-type (content-type) +content-disposition content-disposition (content-disposition) +encoding Content-Transfer-Encoding (string or nil) +children entities included in this entity (list of entity) + +If an entity includes other entities in its body, such as multipart or +message/rfc822, `mime-entity' structures of them are included in +`children', so the `mime-entity' structure become a tree.") + +(make-variable-buffer-local 'mime-message-structure) ;;; @ end