+1998-10-06 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * 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 <morioka@jaist.ac.jp>
+
+ * mime-ja.sgml, mime-en.sgml (mm-backend module): Write
+ description of `mm-define-backend' and `mm-define-method'.
+
1998-10-02 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* std11.el (std11-unfold-string): New implementation.
1.9.1 Tonosh\e-Dò\e-A \e$(BIYLnAq\e(B
1.9.2 Shin-Tanabe \e$(B?7EDJU\e(B
1.10.0 K\e-Dòdo\e-A \e$(B6=8M\e(B
------ Miyamaki \e$(B;0;3LZ\e(B
+1.10.1 Miyamaki \e$(B;0;3LZ\e(B
----- Kintetsu-Miyazu \e$(B6aE45\DE\e(B
----- Komada \e$(B9}ED\e(B
----- Shin-H\e-Dòsono\e-A \e$(B?7=K1`\e(B
1.9.0 Karasuma Oike \e$(B1(4]8fCS\e(B ; = \e$(B5~ET;T8rDL6I\e(B \e$(BEl@>@~\e(B
1.10.0 Marutamach \e$(B4]B@D.\e(B
1.11.0 Imadegawa \e$(B:#=P@n\e(B
+1.11.1 Kuramaguchi \e$(B0HGO8}\e(B
#
PACKAGE = flim-chao
-VERSION = 1.11.0
+VERSION = 1.11.1
TAR = tar
RM = /bin/rm -f
)
))
-(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
(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)
;;; 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
(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
))))
(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)))
</defun>
-<h3> How to make mm-backend
+<h3> Definition of mm-backend
<node> mm-backend module
<p>
-(It is not written yet, sorry. (^_^;)
+<defmacro name="mm-define-backend">
+<args> type
+<opts> parents
<p>
-(Please read mm*.el)
+Define <var>type</var> as a mm-backend.
+<p>
+If <var>PARENTS</var> is specified, <var>type</var> inherits parents.
+Each parent must be representation-type.
+<p>
+Example:
+<p>
+<lisp>
+(mm-define-backend chao (generic))
+</lisp>
+</defmacro>
+
+<defmacro name="mm-define-method">
+<args> name args <rest> body
+<p>
+Define <var>name</var> as a method function of (nth 1 (car
+<var>args</var>)) backend.
+<p>
+<var>args</var> is like an argument list of lambda, but (car
+<var>args</var>) must be specialized parameter. (car (car
+<var>args</var>)) is name of variable and (nth 1 (car
+<var>args</var>)) is name of backend (representation-type).
+<p>
+Example:
+<p>
+<lisp>
+(mm-define-method entity-cooked-p ((entity chao)) nil)
+</lisp>
+</defmacro>
<h1> Information of Content-Type field
</defvar>
+<h2> Other utilities
+<node> Encoding information
+<p>
+<defun name="mime-encoding-list">
+ <opts> SERVICE
+<p>
+Return list of Content-Transfer-Encoding.
+<p>
+If <var>service</var> is specified, it returns available list of
+Content-Transfer-Encoding for it.
+</defun>
+
+<defun name="mime-encoding-alist">
+ <opts> SERVICE
+<p>
+Return table of Content-Transfer-Encoding for completion.
+<p>
+If <var>service</var> is specified, it returns available list of
+Content-Transfer-Encoding for it.
+</defun>
+
+
<h1> Network representation of header
<node> encoded-word
<p>
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
@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
@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
* 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
-@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
+@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
<h3> mm-backend \e$B$N:n$jJ}\e(B
<node> mm-backend module
<p>
-\e$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9\e(B (^_^;\e$B!K\e(B
+<defmacro name="mm-define-backend">
+<args> type
+<opts> parents
<p>
-\e$B!J$H$j$"$($:!"\e(Bmm*.el \e$B$r;29M$K$7$F$/$@$5$$!K\e(B
+Define <var>type</var> as a mm-backend.
+<p>
+If <var>PARENTS</var> is specified, <var>type</var> inherits parents.
+Each parent must be representation-type.
+<p>
+Example:
+<p>
+<lisp>
+(mm-define-backend chao (generic))
+</lisp>
+</defmacro>
+
+<defmacro name="mm-define-method">
+<args> name args <rest> body
+<p>
+Define <var>name</var> as a method function of (nth 1 (car
+<var>args</var>)) backend.
+<p>
+<var>args</var> is like an argument list of lambda, but (car
+<var>args</var>) must be specialized parameter. (car (car
+<var>args</var>)) is name of variable and (nth 1 (car
+<var>args</var>)) is name of backend (representation-type).
+<p>
+Example:
+<p>
+<lisp>
+(mm-define-method entity-cooked-p ((entity chao)) nil)
+</lisp>
+</defmacro>
<h1> Content-Type \e$BMs$N>pJs\e(B
@node mm-backend module, , Request for entity, mm-backend
@subsection mm-backend \e$B$N:n$jJ}\e(B
-\e$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9\e(B (^_^;\e$B!K\e(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
-\e$B!J$H$j$"$($:!"\e(Bmm*.el \e$B$r;29M$K$7$F$/$@$5$$!K\e(B
@node Content-Type, Content-Disposition, Entity, Top