From 991a0b3207d7a7943084a5cf0fdb00e4456bc6f0 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 25 Jul 1998 04:23:13 +0000 Subject: [PATCH] (coding-system-change-eol-conversion): Make it accepts an integer value in EOL-TYPE argument. --- lisp/international/mule-util.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index cba5abfc9d4..96a69730583 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -294,12 +294,16 @@ The returned coding system converts end-of-line by EOL-TYPE but text as the same way as CODING-SYSTEM. EOL-TYPE should be `unix', `dos', `mac', or nil. If EOL-TYPE is nil, the returned coding system detects -how end-of-line is formatted automatically while decoding." - (let ((eol-type (cond ((eq eol-type 'unix) 0) - ((eq eol-type 'dos) 1) - ((eq eol-type 'mac) 2) - (t eol-type))) - (orig-eol-type (coding-system-eol-type coding-system))) +how end-of-line is formatted automatically while decoding. + +EOL-TYPE can be specified by an integer 0, 1, or 2. +They means `unix', `dos', and `mac' respectively." + (if (symbolp eol-type) + (setq eol-type (cond ((eq eol-type 'unix) 0) + ((eq eol-type 'dos) 1) + ((eq eol-type 'mac) 2) + (t eol-type)))) + (let ((orig-eol-type (coding-system-eol-type coding-system))) (if (vectorp orig-eol-type) (if (not eol-type) coding-system -- 2.39.2