aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1998-07-25 04:23:13 +0000
committerKenichi Handa1998-07-25 04:23:13 +0000
commit991a0b3207d7a7943084a5cf0fdb00e4456bc6f0 (patch)
tree901e6ff8983d001873a2e7d72f88369bcb6da979
parent835f49b8bfe7afa8bb370bb4d706789253d55a45 (diff)
downloademacs-991a0b3207d7a7943084a5cf0fdb00e4456bc6f0.tar.gz
emacs-991a0b3207d7a7943084a5cf0fdb00e4456bc6f0.zip
(coding-system-change-eol-conversion): Make it accepts an integer
value in EOL-TYPE argument.
-rw-r--r--lisp/international/mule-util.el16
1 files 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
294but text as the same way as CODING-SYSTEM. 294but text as the same way as CODING-SYSTEM.
295EOL-TYPE should be `unix', `dos', `mac', or nil. 295EOL-TYPE should be `unix', `dos', `mac', or nil.
296If EOL-TYPE is nil, the returned coding system detects 296If EOL-TYPE is nil, the returned coding system detects
297how end-of-line is formatted automatically while decoding." 297how end-of-line is formatted automatically while decoding.
298 (let ((eol-type (cond ((eq eol-type 'unix) 0) 298
299 ((eq eol-type 'dos) 1) 299EOL-TYPE can be specified by an integer 0, 1, or 2.
300 ((eq eol-type 'mac) 2) 300They means `unix', `dos', and `mac' respectively."
301 (t eol-type))) 301 (if (symbolp eol-type)
302 (orig-eol-type (coding-system-eol-type coding-system))) 302 (setq eol-type (cond ((eq eol-type 'unix) 0)
303 ((eq eol-type 'dos) 1)
304 ((eq eol-type 'mac) 2)
305 (t eol-type))))
306 (let ((orig-eol-type (coding-system-eol-type coding-system)))
303 (if (vectorp orig-eol-type) 307 (if (vectorp orig-eol-type)
304 (if (not eol-type) 308 (if (not eol-type)
305 coding-system 309 coding-system