;;; Code:
-(eval-when-compile
- (require 'static)
- (require 'poem)
- )
+(eval-when-compile (require 'static))
+
+(defsubst find-coding-system (obj)
+ "Return OBJ if it is a coding-system."
+ (if (coding-system-p obj)
+ obj))
(defsubst encode-mime-charset-region (start end charset &optional lbt)
"Encode the text between START and END as MIME CHARSET."
; chinese-cns11643-7) . iso-2022-int-1)
))
-(defun-maybe coding-system-get (coding-system prop)
- "Extract a value from CODING-SYSTEM's property list for property PROP."
- (plist-get (coding-system-plist coding-system) prop)
- )
-
(defun coding-system-to-mime-charset (coding-system)
"Convert CODING-SYSTEM to a MIME-charset.
Return nil if corresponding MIME-charset is not found."
(coding-system-get coding-system 'mime-charset)
))
-(defun-maybe-cond mime-charset-list ()
+(defun mime-charset-list ()
"Return a list of all existing MIME-charset."
- ((boundp 'coding-system-list)
- (let ((dest (mapcar (function car) mime-charset-coding-system-alist))
- (rest coding-system-list)
- cs)
- (while rest
- (setq cs (car rest))
- (unless (rassq cs mime-charset-coding-system-alist)
- (if (setq cs (coding-system-get cs 'mime-charset))
- (or (rassq cs mime-charset-coding-system-alist)
- (memq cs dest)
- (setq dest (cons cs dest))
- )))
- (setq rest (cdr rest)))
- dest))
- (t
- (let ((dest (mapcar (function car) mime-charset-coding-system-alist))
- (rest (coding-system-list))
- cs)
- (while rest
- (setq cs (car rest))
- (unless (rassq cs mime-charset-coding-system-alist)
- (when (setq cs (or (coding-system-get cs 'mime-charset)
- (and
- (setq cs (aref
- (coding-system-get cs 'coding-spec)
- 2))
- (string-match "(MIME:[ \t]*\\([^,)]+\\)" cs)
- (match-string 1 cs))))
- (setq cs (intern (downcase cs)))
+ (let ((dest (mapcar (function car) mime-charset-coding-system-alist))
+ (rest coding-system-list)
+ cs)
+ (while rest
+ (setq cs (car rest))
+ (unless (rassq cs mime-charset-coding-system-alist)
+ (if (setq cs (coding-system-get cs 'mime-charset))
(or (rassq cs mime-charset-coding-system-alist)
- (memq cs dest)
+ (memq cs dest)
(setq dest (cons cs dest))
)))
- (setq rest (cdr rest)))
- dest)
- ))
+ (setq rest (cdr rest)))
+ dest))
(static-when (and (string= (decode-coding-string "\e.A\eN!" 'ctext) "\eN!")
(or (not (find-coding-system 'x-ctext))
;;; @ end
;;;
-(require 'mcs-20)
-
(require 'product)
(product-provide (provide 'mcs-e20) (require 'apel-ver))