From 71d0f8083b6cf3bee4c11e1e646b876539f9fc3d Mon Sep 17 00:00:00 2001 From: morioka Date: Thu, 24 Dec 1998 12:33:34 +0000 Subject: [PATCH] (charsets-to-mime-charset): Return nil if suitable mime-charset is not found; abolish optional argument `default'. --- mcharset.el | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/mcharset.el b/mcharset.el index 15de1a6..3b02f6c 100644 --- a/mcharset.el +++ b/mcharset.el @@ -47,29 +47,27 @@ )) -(defun charsets-to-mime-charset (charsets &optional default) +(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'." +Return nil if suitable mime-charset is not found." (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 - default-mime-charset))) + (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))) + )))) ;;; @ end -- 1.7.10.4