]> git.eshelyaron.com Git - emacs.git/commitdiff
(coding-system-eol-type-mnemonic): Move from mule-util.el.
authorJuanma Barranquero <lekktu@gmail.com>
Tue, 5 Nov 2002 10:42:25 +0000 (10:42 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Tue, 5 Nov 2002 10:42:25 +0000 (10:42 +0000)
lisp/international/mule.el

index 0719a2b2ec40640756bf7b4b02fb0d82af2563c6..f325c60b80e9fd76a27a531b1bb5a0706edf564f 100644 (file)
@@ -513,6 +513,18 @@ detected automatically.  Nth element of the vector is the subsidiary
 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)