:group 'mime
:type '(repeat string))
-(defvar mel-encoding-module-alist nil)
-
(defun mime-encoding-list (&optional service)
"Return list of Content-Transfer-Encoding.
If SERVICE is specified, it returns available list of
)))
(defsubst mel-find-function (service encoding)
- (let* ((oba (symbol-value (intern (format "%s-obarray" service))))
- (f (intern-soft encoding oba)))
- (or f
- (let ((rest (cdr (assoc encoding mel-encoding-module-alist))))
- (while (and rest
- (progn
- (require (car rest))
- (null (setq f (intern-soft encoding oba)))
- ))
- (setq rest (cdr rest))
- )
- f))))
+ (mel-find-function-from-obarray
+ (symbol-value (intern (format "%s-obarray" service))) encoding))
;;; @ setting for modules
(mel-use-module 'mel-b-dl '("base64" "B"))
)
+(mel-define-backend "7bit")
(mel-define-method-function (mime-encode-string string (nil "7bit"))
'identity)
(mel-define-method-function (mime-decode-string string (nil "7bit"))
start end filename (nil "7bit"))
'write-region-as-binary)
-(mel-define-method-function (mime-encode-string string (nil "8bit"))
- 'identity)
-(mel-define-method-function (mime-decode-string string (nil "8bit"))
- 'identity)
-(mel-define-method mime-encode-region (start end (nil "8bit")))
-(mel-define-method mime-decode-region (start end (nil "8bit")))
-(mel-define-method-function (mime-insert-encoded-file filename (nil "8bit"))
- 'insert-file-contents-as-binary)
-(mel-define-method-function (mime-write-decoded-region
- start end filename (nil "8bit"))
- 'write-region-as-binary)
+(mel-define-backend "8bit" ("7bit"))
-(mel-define-method-function (mime-encode-string string (nil "binary"))
- 'identity)
-(mel-define-method-function (mime-decode-string string (nil "binary"))
- 'identity)
-(mel-define-method mime-encode-region (start end (nil "binary")))
-(mel-define-method mime-decode-region (start end (nil "binary")))
-(mel-define-method-function (mime-insert-encoded-file filename (nil "binary"))
- 'insert-file-contents-as-binary)
-(mel-define-method-function (mime-write-decoded-region
- start end filename (nil "binary"))
- 'write-region-as-binary)
+(mel-define-backend "binary" ("8bit"))
;;; @ region