changeset 22814:205a87f52b30

(coding-system-change-eol-conversion): Make it accepts an integer value in EOL-TYPE argument.
author Kenichi Handa <handa@m17n.org>
date Sat, 25 Jul 1998 04:23:13 +0000
parents b209a00e464e
children 6af93eeeca10
files lisp/international/mule-util.el
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-util.el	Sat Jul 25 04:23:13 1998 +0000
+++ b/lisp/international/mule-util.el	Sat Jul 25 04:23:13 1998 +0000
@@ -294,12 +294,16 @@
 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