From ebe6e414225125fd77e4da62e88eef12b584952f Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 10 Aug 1998 17:25:35 +0000 Subject: [PATCH] (mime-charset-to-coding-system): Regard `CRLF', `LF', `CR' as line break code type. --- emu-20.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/emu-20.el b/emu-20.el index d02680b..ea174fd 100644 --- a/emu-20.el +++ b/emu-20.el @@ -127,8 +127,8 @@ MIME CHARSET and CODING-SYSTEM must be symbol." (defsubst mime-charset-to-coding-system (charset &optional lbt) "Return coding-system corresponding with CHARSET. CHARSET is a symbol whose name is MIME charset. -If optional argument LBT (`unix', `dos' or `mac') is specified, it is -used as line break code type of coding-system." +If optional argument LBT (`CRLF', `LF', `CR', `unix', `dos' or `mac') +is specified, it is used as line break code type of coding-system." (if (stringp charset) (setq charset (intern (downcase charset))) ) @@ -137,7 +137,11 @@ used as line break code type of coding-system." (setq charset (cdr ret)) )) (if lbt - (setq charset (intern (format "%s-%s" charset lbt))) + (setq charset (intern (format "%s-%s" charset + (cond ((eq lbt 'CRLF) 'dos) + ((eq lbt 'LF) 'unix) + ((eq lbt 'CR) 'mac) + (t lbt))))) ) (if (find-coding-system charset) charset)) -- 1.7.10.4