diff options
author | Kenichi Handa <handa@m17n.org> | 1997-08-22 03:33:51 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-08-22 03:33:51 +0000 |
commit | 7e723e9946413af1001f816c8b1f72fba3c78bcd (patch) | |
tree | 74b6152b2cc5c1c90e2f382c7750e32bf3dd6ea1 | |
parent | 394fccee37d02857626d8d713e3d602dac6f4532 (diff) | |
download | emacs-7e723e9946413af1001f816c8b1f72fba3c78bcd.tar.gz |
(detect_eol): If the coding system an alias, get
eol-type from the base of it.
-rw-r--r-- | src/coding.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c index e46a1289ba2..548a7388527 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2825,14 +2825,17 @@ detect_eol (coding, src, src_bytes) unsigned char *src; int src_bytes; { - Lisp_Object val; + Lisp_Object val, coding_system; int eol_type = detect_eol_type (src, src_bytes); if (eol_type == CODING_EOL_UNDECIDED) /* We found no end-of-line in the source text. */ return; - val = Fget (coding->symbol, Qeol_type); + coding_system = coding->symbol; + while (!NILP (coding_system) + && NILP (val = Fget (coding_system, Qeol_type))) + coding_system = Fget (coding_system, Qcoding_system); if (VECTORP (val) && XVECTOR (val)->size == 3) setup_coding_system (XVECTOR (val)->contents[eol_type], coding); } |