X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-def.el;h=f4ced4dffd033761d3001a0b834acd63e023f62b;hb=a55777116ab99c182ba55824eedde84e616c2bd7;hp=acae86fa2af242ff87412126109e59b7dc7762d9;hpb=0bfe7cf2b99ce1b05d8c3348a5c6d352817f7e3d;p=elisp%2Fflim.git diff --git a/mime-def.el b/mime-def.el index acae86f..f4ced4d 100644 --- a/mime-def.el +++ b/mime-def.el @@ -24,9 +24,7 @@ ;;; Code: -(require 'poe) -(require 'poem) -(require 'pcustom) +(require 'custom) (require 'mcharset) (require 'alist) @@ -36,7 +34,7 @@ ) (eval-and-compile - (defconst mime-library-product ["FLIM" (1 14 0) "Ninokuchi"] + (defconst mime-library-product ["FLIM" (1 14 1) "Yagi"] "Product name, version number and code name of MIME-library package.")) (defmacro mime-product-name (product) @@ -59,8 +57,6 @@ ;;; @ variables ;;; -(require 'custom) - (defgroup mime '((default-mime-charset custom-variable)) "Emacs MIME Interfaces" :group 'news @@ -72,6 +68,54 @@ :type '(repeat string)) +;;; @@ for encoded-word +;;; + +(defgroup mime-header nil + "Header representation, specially encoded-word" + :group 'mime) + +;;; @@@ decoding +;;; + +(defcustom mime-field-decoding-max-size 1000 + "*Max size to decode header field." + :group 'mime-header + :type '(choice (integer :tag "Limit (bytes)") + (const :tag "Don't limit" nil))) + +;;; @@@ encoding +;;; + +(defcustom mime-field-encoding-method-alist + '(("X-Nsubject" . iso-2022-jp-2) + ("Newsgroups" . nil) + ("Message-ID" . nil) + (t . mime) + ) + "*Alist to specify field encoding method. +Its key is field-name, value is encoding method. + +If method is `mime', this field will be encoded into MIME format. + +If method is a MIME-charset, this field will be encoded as the charset +when it must be convert into network-code. + +If method is `default-mime-charset', this field will be encoded as +variable `default-mime-charset' when it must be convert into +network-code. + +If method is nil, this field will not be encoded." + :group 'mime-header + :type '(repeat (cons (choice :tag "Field" + (string :tag "Name") + (const :tag "Default" t)) + (choice :tag "Method" + (const :tag "MIME conversion" mime) + (symbol :tag "non-MIME conversion") + (const :tag "no-conversion" nil))))) + + ;;; @ required functions ;;; @@ -81,6 +125,9 @@ (defsubst regexp-or (&rest args) (concat "\\(" (mapconcat (function identity) args "\\|") "\\)")) +(or (fboundp 'char-int) + (defalias 'char-int 'identity)) + ;;; @ about STD 11 ;;; @@ -167,11 +214,11 @@ (cdr (car content-type))) (defsubst mime-content-type-subtype (content-type) - "Return primary-type of CONTENT-TYPE." + "Return subtype of CONTENT-TYPE." (cdr (cadr content-type))) (defsubst mime-content-type-parameters (content-type) - "Return primary-type of CONTENT-TYPE." + "Return parameters of CONTENT-TYPE." (cddr content-type)) (defsubst mime-content-type-parameter (content-type parameter)