changeset 48155:f1434b395146

(coding-system-eol-type-mnemonic): Move from mule-util.el.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 05 Nov 2002 10:42:25 +0000
parents af5c7876e741
children 5701c670b676
files lisp/international/mule.el
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Tue Nov 05 07:23:26 2002 +0000
+++ b/lisp/international/mule.el	Tue Nov 05 10:42:25 2002 +0000
@@ -513,6 +513,18 @@
 coding system whose eol-type is N."
   (get coding-system 'eol-type))
 
+(defun coding-system-eol-type-mnemonic (coding-system)
+  "Return the string indicating end-of-line format of CODING-SYSTEM."
+  (let* ((eol-type (coding-system-eol-type coding-system))
+	 (val (cond ((vectorp eol-type) eol-mnemonic-undecided)
+		    ((eq eol-type 0) eol-mnemonic-unix)
+		    ((eq eol-type 1) eol-mnemonic-dos)
+		    ((eq eol-type 2) eol-mnemonic-mac)
+		    (t "-"))))
+    (if (stringp val)
+	val
+      (char-to-string val))))
+
 (defun coding-system-lessp (x y)
   (cond ((eq x 'no-conversion) t)
 	((eq y 'no-conversion) nil)