Function: coding-system-eol-type
coding-system-eol-type is a function defined in coding.c.
Signature
(coding-system-eol-type CODING-SYSTEM)
Documentation
Return eol-type of CODING-SYSTEM.
An eol-type is an integer 0, 1, 2, or a vector of coding systems.
Integer values 0, 1, and 2 indicate a format of end-of-line; LF, CRLF, and CR respectively.
A vector value indicates that a format of end-of-line should be detected automatically. Nth element of the vector is the subsidiary coding system whose eol-type is N.
Source Code
// Defined in /usr/src/emacs/src/coding.c
{
Lisp_Object spec, eol_type;
int n;
if (NILP (coding_system))
coding_system = Qno_conversion;
if (! CODING_SYSTEM_P (coding_system))
return Qnil;
spec = CODING_SYSTEM_SPEC (coding_system);
eol_type = AREF (spec, 2);
if (VECTORP (eol_type))
return Fcopy_sequence (eol_type);
n = EQ (eol_type, Qunix) ? 0 : EQ (eol_type, Qdos) ? 1 : 2;
return make_fixnum (n);
}