From 4df3a7b0ea4215dc7da3c40f8d5c0e089bbdb8e7 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 15 Dec 2000 10:02:10 +0000 Subject: [PATCH] - 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'. --- mime/mcs-e20.el | 62 +++++++++++++++---------------------------------------- 1 file changed, 17 insertions(+), 45 deletions(-) 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)) -- 1.7.10.4