From: tomo Date: Fri, 15 Dec 2000 10:02:10 +0000 (+0000) Subject: - Don't require `poem'. X-Git-Tag: semi21-1_14_0-1~36 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4df3a7b0ea4215dc7da3c40f8d5c0e089bbdb8e7;p=elisp%2Flemi.git - Don't require `poem'. (find-coding-system): New inline function. (coding-system-get): Deleted. (mime-charset-list): Don't use `defun-maybe-cond'. - Don't require `mcs-20'. --- diff --git a/mime/mcs-e20.el b/mime/mcs-e20.el index 00b621e..e0713fa 100644 --- a/mime/mcs-e20.el +++ b/mime/mcs-e20.el @@ -28,10 +28,12 @@ ;;; 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." @@ -107,11 +109,6 @@ ; 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." @@ -119,44 +116,21 @@ 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)) @@ -177,8 +151,6 @@ Return nil if corresponding MIME-charset is not found." ;;; @ end ;;; -(require 'mcs-20) - (require 'product) (product-provide (provide 'mcs-e20) (require 'apel-ver))