From: morioka Date: Wed, 7 Oct 1998 13:14:04 +0000 (+0000) Subject: Sync with flim-1_10_1. X-Git-Tag: flim-chao-1_11_1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6370d4ce8b86f041683f6f5c665a527b84068320;p=elisp%2Fflim.git Sync with flim-1_10_1. --- diff --git a/ChangeLog b/ChangeLog index 6f5c95a..15e372c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +1998-10-06 MORIOKA Tomohiko + + * mel-g.el: Define method functions of mel. + (mime-encode-region): Use `mel-define-method-function'; abolish + `gzip64-encode-region'. + (mime-decode-region): Use `mel-define-method-function'; abolish + `gzip64-decode-region'. + (mime-encode-string): New method. + (mime-decode-string): New method. + (mime-insert-encoded-file): Use `mel-define-method'; abolish + `gzip64-insert-encoded-file'. + (mime-write-decoded-region): Use `mel-define-method'; abolish + `gzip64-write-decoded-region'. + + * mime-def.el (mime-library-product): New variable; abolish + `mime-library-version'. + (mime-product-name): New macro. + (mime-product-version): New macro. + (mime-product-code-name): New macro. + (mime-library-version): Renamed from + `mime-library-version-string'; use `mime-library-product', + `mime-product-name', `mime-product-version' and + `mime-product-code-name'. + + * mime-def.el (mm-define-backend): Add DOC. + (mm-define-method): Add DOC. + + * mel.el (mime-encoding-list): Modify DOC to add description about + optional argument SERVICE. + +1998-10-04 MORIOKA Tomohiko + + * mime-ja.sgml, mime-en.sgml (mm-backend module): Write + description of `mm-define-backend' and `mm-define-method'. + 1998-10-02 MORIOKA Tomohiko * std11.el (std11-unfold-string): New implementation. diff --git a/FLIM-VERSION b/FLIM-VERSION index 5fa8b54..d9985d7 100644 --- a/FLIM-VERSION +++ b/FLIM-VERSION @@ -23,7 +23,7 @@ 1.9.1 Tonosh-Dò-A $(BIYLnAq(B 1.9.2 Shin-Tanabe $(B?7EDJU(B 1.10.0 K-Dòdo-A $(B6=8M(B ------ Miyamaki $(B;0;3LZ(B +1.10.1 Miyamaki $(B;0;3LZ(B ----- Kintetsu-Miyazu $(B6aE45\DE(B ----- Komada $(B9}ED(B ----- Shin-H-Dòsono-A $(B?7=K1`(B @@ -61,3 +61,4 @@ 1.9.0 Karasuma Oike $(B1(4]8fCS(B ; = $(B5~ET;T8rDL6I(B $(BEl@>@~(B 1.10.0 Marutamach $(B4]B@D.(B 1.11.0 Imadegawa $(B:#=P@n(B +1.11.1 Kuramaguchi $(B0HGO8}(B diff --git a/Makefile b/Makefile index e4b82dd..9e0da2a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # PACKAGE = flim-chao -VERSION = 1.11.0 +VERSION = 1.11.1 TAR = tar RM = /bin/rm -f diff --git a/mel-g.el b/mel-g.el index 73db30f..bc2c510 100644 --- a/mel-g.el +++ b/mel-g.el @@ -82,21 +82,40 @@ ) )) -(defalias 'gzip64-encode-region 'gzip64-external-encode-region) -(defalias 'gzip64-decode-region 'gzip64-external-decode-region) +(mel-define-method-function (mime-encode-region start end (nil "x-gzip64")) + 'gzip64-external-encode-region) +(mel-define-method-function (mime-decode-region start end (nil "x-gzip64")) + 'gzip64-external-decode-region) + + +;;; @ encoder/decoder for string +;;; + +(mel-define-method mime-encode-string (string (nil "x-gzip64")) + (with-temp-buffer + (insert string) + (gzip64-external-encode-region (point-min)(point-max)) + (buffer-string))) + +(mel-define-method mime-decode-string (string (nil "x-gzip64")) + (with-temp-buffer + (insert string) + (gzip64-external-decode-region (point-min)(point-max)) + (buffer-string))) ;;; @ encoder/decoder for file ;;; -(defun gzip64-insert-encoded-file (filename) +(mel-define-method mime-insert-encoded-file (filename (nil "x-gzip64")) (interactive (list (read-file-name "Insert encoded file: "))) (apply (function call-process) (car gzip64-external-encoder) filename t nil (cdr gzip64-external-encoder)) ) -(defun gzip64-write-decoded-region (start end filename) +(mel-define-method mime-write-decoded-region (start end filename + (nil "x-gzip64")) "Decode and write current region encoded by gzip64 into FILENAME. START and END are buffer positions." (interactive diff --git a/mel.el b/mel.el index 2b59fda..e0a1339 100644 --- a/mel.el +++ b/mel.el @@ -37,7 +37,9 @@ (defvar mel-encoding-module-alist nil) (defun mime-encoding-list (&optional service) - "Return list of Content-Transfer-Encoding." + "Return list of Content-Transfer-Encoding. +If SERVICE is specified, it returns available list of +Content-Transfer-Encoding for it." (if service (let (dest) (mapatoms (lambda (sym) diff --git a/mime-def.el b/mime-def.el index 3496c53..9b70f50 100644 --- a/mime-def.el +++ b/mime-def.el @@ -24,15 +24,24 @@ ;;; Code: -(defconst mime-library-version - '("Chao" "Imadegawa" 1 11 0) - "Implementation name, version name and numbers of MIME-library package.") +(defconst mime-library-product ["Chao" (1 11 1) "Kuramaguchi"] + "Product name, version number and code name of MIME-library package.") + +(defmacro mime-product-name (product) + `(aref ,product 0)) + +(defmacro mime-product-version (product) + `(aref ,product 1)) -(defconst mime-library-version-string - `,(concat (car mime-library-version) " " +(defmacro mime-product-code-name (product) + `(aref ,product 2)) + +(defconst mime-library-version + (eval-when-compile + (concat (mime-product-name mime-library-product) " " (mapconcat #'number-to-string - (cddr mime-library-version) ".") - " - \"" (cadr mime-library-version) "\"")) + (mime-product-version mime-library-product) ".") + " - \"" (mime-product-code-name mime-library-product) "\""))) ;;; @ variables @@ -359,6 +368,9 @@ message/rfc822, `mime-entity' structures of them are included in (defvar mime-entity-implementation-alist nil) (defmacro mm-define-backend (type &optional parents) + "Define mm-backend TYPE. +If PARENTS is specified, TYPE inherits PARENTS. +Each parent must be backend name (symbol)." (if parents `(let ((rest ',(reverse parents))) (while rest @@ -371,6 +383,11 @@ message/rfc822, `mime-entity' structures of them are included in )))) (defmacro mm-define-method (name args &rest body) + "Define NAME as a method function of (nth 1 (car ARGS)) backend. + +ARGS is like an argument list of lambda, but (car ARGS) must be +specialized parameter. (car (car ARGS)) is name of variable and (nth +1 (car ARGS)) is name of backend." (let* ((specializer (car args)) (class (nth 1 specializer)) (self (car specializer))) diff --git a/mime-en.sgml b/mime-en.sgml index ed4b19f..81a115b 100644 --- a/mime-en.sgml +++ b/mime-en.sgml @@ -393,12 +393,42 @@ return the result. -

How to make mm-backend +

Definition of mm-backend mm-backend module

-(It is not written yet, sorry. (^_^;) + + type + parents

-(Please read mm*.el) +Define type as a mm-backend. +

+If PARENTS is specified, type inherits parents. +Each parent must be representation-type. +

+Example: +

+ +(mm-define-backend chao (generic)) + + + + + name args body +

+Define name as a method function of (nth 1 (car +args)) backend. +

+args is like an argument list of lambda, but (car +args) must be specialized parameter. (car (car +args)) is name of variable and (nth 1 (car +args)) is name of backend (representation-type). +

+Example: +

+ +(mm-define-method entity-cooked-p ((entity chao)) nil) + +

Information of Content-Type field @@ -731,6 +761,28 @@ region to file. +

Other utilities + Encoding information +

+ + SERVICE +

+Return list of Content-Transfer-Encoding. +

+If service is specified, it returns available list of +Content-Transfer-Encoding for it. + + + + SERVICE +

+Return table of Content-Transfer-Encoding for completion. +

+If service is specified, it returns available list of +Content-Transfer-Encoding for it. + + +

Network representation of header encoded-word

diff --git a/mime-en.texi b/mime-en.texi index f3bbf8a..3d94875 100644 --- a/mime-en.texi +++ b/mime-en.texi @@ -101,7 +101,8 @@ mime-entity.@refill If @var{buffer} is omitted, current buffer is used.@refill @var{type} is representation-type of created -mime-entity. (cf. @ref{mm-backend}) Default value is @var{buffer}. +mime-entity. (cf. @ref{mm-backend}) + Default value is @var{buffer}. @end defun @@ -414,7 +415,7 @@ when its entity is created at first. @menu * Request for entity:: Message-passing for entity -* mm-backend module:: How to make mm-backend +* mm-backend module:: Definition of mm-backend @end menu @node Request for entity, mm-backend module, mm-backend, mm-backend @@ -431,11 +432,40 @@ result.@refill @node mm-backend module, , Request for entity, mm-backend -@subsection How to make mm-backend +@subsection Definition of mm-backend -(It is not written yet, sorry. (^_^;)@refill +@defmac mm-define-backend type &optional parents + +Define @var{type} as a mm-backend.@refill + +If @var{PARENTS} is specified, @var{type} inherits parents. Each parent +must be representation-type.@refill + +Example:@refill + +@lisp +(mm-define-backend chao (generic)) +@end lisp +@end defmac + + +@defmac mm-define-method name args &rest body + +Define @var{name} as a method function of (nth 1 (car @var{args})) +backend.@refill + +@var{args} is like an argument list of lambda, but (car @var{args}) must +be specialized parameter. (car (car @var{args})) is name of variable +and (nth 1 (car @var{args})) is name of backend +(representation-type).@refill + +Example:@refill + +@lisp +(mm-define-method entity-cooked-p ((entity chao)) nil) +@end lisp +@end defmac -(Please read mm*.el) @node Content-Type, Content-Disposition, Entity, Top @@ -697,6 +727,7 @@ Content-Transfer-Encoding. * Region encoder/decoder:: Region encoding/decoding * String encoder/decoder:: String encoding/decoding * File encoder/decoder:: File encoding/decoding +* Encoding information:: Other utilities @end menu @node Content-Transfer-Encoding parser, Region encoder/decoder, Content-Transfer-Encoding, Content-Transfer-Encoding @@ -776,7 +807,7 @@ content-transfer-encoding. FUNCTION is string decoder. -@node File encoder/decoder, , String encoder/decoder, Content-Transfer-Encoding +@node File encoder/decoder, Encoding information, String encoder/decoder, Content-Transfer-Encoding @section File encoding/decoding @defun mime-insert-encoded-file filename encoding @@ -816,6 +847,28 @@ to file. +@node Encoding information, , File encoder/decoder, Content-Transfer-Encoding +@section Other utilities + +@defun mime-encoding-list &optional SERVICE + +Return list of Content-Transfer-Encoding.@refill + +If @var{service} is specified, it returns available list of +Content-Transfer-Encoding for it. +@end defun + + +@defun mime-encoding-alist &optional SERVICE + +Return table of Content-Transfer-Encoding for completion.@refill + +If @var{service} is specified, it returns available list of +Content-Transfer-Encoding for it. +@end defun + + + @node encoded-word, custom, Content-Transfer-Encoding, Top @chapter Network representation of header @cindex RFC 2047 diff --git a/mime-ja.sgml b/mime-ja.sgml index 8240d6b..2a8e47f 100644 --- a/mime-ja.sgml +++ b/mime-ja.sgml @@ -396,9 +396,39 @@ representation-type $B$NL>A0$N@hF,$K(B mm $B$rIU$1$?$b$N$K$J$C$F

mm-backend $B$N:n$jJ}(B mm-backend module

-$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9(B (^_^;$B!K(B + + type + parents

-$B!J$H$j$"$($:!"(Bmm*.el $B$r;29M$K$7$F$/$@$5$$!K(B +Define type as a mm-backend. +

+If PARENTS is specified, type inherits parents. +Each parent must be representation-type. +

+Example: +

+ +(mm-define-backend chao (generic)) + + + + + name args body +

+Define name as a method function of (nth 1 (car +args)) backend. +

+args is like an argument list of lambda, but (car +args) must be specialized parameter. (car (car +args)) is name of variable and (nth 1 (car +args)) is name of backend (representation-type). +

+Example: +

+ +(mm-define-method entity-cooked-p ((entity chao)) nil) + +

Content-Type $BMs$N>pJs(B diff --git a/mime-ja.texi b/mime-ja.texi index c2df06a..e8e1ab6 100644 --- a/mime-ja.texi +++ b/mime-ja.texi @@ -433,9 +433,38 @@ representation-type $B$NL>A0$N@hF,$K(B @code{mm} $B$rIU$1$?$b$N$K$J$C$F(B @node mm-backend module, , Request for entity, mm-backend @subsection mm-backend $B$N:n$jJ}(B -$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9(B (^_^;$B!K(B@refill +@defmac mm-define-backend type &optional parents + +Define @var{type} as a mm-backend.@refill + +If @var{PARENTS} is specified, @var{type} inherits parents. Each parent +must be representation-type.@refill + +Example:@refill + +@lisp +(mm-define-backend chao (generic)) +@end lisp +@end defmac + + +@defmac mm-define-method name args &rest body + +Define @var{name} as a method function of (nth 1 (car @var{args})) +backend.@refill + +@var{args} is like an argument list of lambda, but (car @var{args}) must +be specialized parameter. (car (car @var{args})) is name of variable +and (nth 1 (car @var{args})) is name of backend +(representation-type).@refill + +Example:@refill + +@lisp +(mm-define-method entity-cooked-p ((entity chao)) nil) +@end lisp +@end defmac -$B!J$H$j$"$($:!"(Bmm*.el $B$r;29M$K$7$F$/$@$5$$!K(B @node Content-Type, Content-Disposition, Entity, Top