From: morioka Date: Thu, 17 Sep 1998 14:22:06 +0000 (+0000) Subject: Move function `charsets-to-mime-charset' from emu.el to mcharset.el. X-Git-Tag: poe-199811302358~35 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8f661a3c100213f29fd94a9262c0338837ef97d8;p=elisp%2Fapel.git Move function `charsets-to-mime-charset' from emu.el to mcharset.el. --- diff --git a/emu.el b/emu.el index 287a07e..8994e49 100644 --- a/emu.el +++ b/emu.el @@ -133,33 +133,6 @@ find-file-hooks, etc. (insert-file-contents-literally filename visit beg end replace))) -;;; @ MIME charset -;;; - -(defun charsets-to-mime-charset (charsets) - "Return MIME charset from list of charset CHARSETS. -This function refers variable `charsets-mime-charset-alist' -and `default-mime-charset'." - (if charsets - (or (catch 'tag - (let ((rest charsets-mime-charset-alist) - cell) - (while (setq cell (car rest)) - (if (catch 'not-subset - (let ((set1 charsets) - (set2 (car cell)) - obj) - (while set1 - (setq obj (car set1)) - (or (memq obj set2) - (throw 'not-subset nil)) - (setq set1 (cdr set1))) - t)) - (throw 'tag (cdr cell))) - (setq rest (cdr rest))))) - default-mime-charset))) - - ;;; @ Emacs 20.3 emulation ;;; diff --git a/mcharset.el b/mcharset.el index dbfa024..cc499b6 100644 --- a/mcharset.el +++ b/mcharset.el @@ -47,6 +47,30 @@ )) +(defun charsets-to-mime-charset (charsets) + "Return MIME charset from list of charset CHARSETS. +This function refers variable `charsets-mime-charset-alist' +and `default-mime-charset'." + (if charsets + (or (catch 'tag + (let ((rest charsets-mime-charset-alist) + cell) + (while (setq cell (car rest)) + (if (catch 'not-subset + (let ((set1 charsets) + (set2 (car cell)) + obj) + (while set1 + (setq obj (car set1)) + (or (memq obj set2) + (throw 'not-subset nil)) + (setq set1 (cdr set1))) + t)) + (throw 'tag (cdr cell))) + (setq rest (cdr rest))))) + default-mime-charset))) + + ;;; @ end ;;;