diff options
Diffstat (limited to 'src/coding.c')
| -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) | |||
| 2825 | unsigned char *src; | 2825 | unsigned char *src; |
| 2826 | int src_bytes; | 2826 | int src_bytes; |
| 2827 | { | 2827 | { |
| 2828 | Lisp_Object val; | 2828 | Lisp_Object val, coding_system; |
| 2829 | int eol_type = detect_eol_type (src, src_bytes); | 2829 | int eol_type = detect_eol_type (src, src_bytes); |
| 2830 | 2830 | ||
| 2831 | if (eol_type == CODING_EOL_UNDECIDED) | 2831 | if (eol_type == CODING_EOL_UNDECIDED) |
| 2832 | /* We found no end-of-line in the source text. */ | 2832 | /* We found no end-of-line in the source text. */ |
| 2833 | return; | 2833 | return; |
| 2834 | 2834 | ||
| 2835 | val = Fget (coding->symbol, Qeol_type); | 2835 | coding_system = coding->symbol; |
| 2836 | while (!NILP (coding_system) | ||
| 2837 | && NILP (val = Fget (coding_system, Qeol_type))) | ||
| 2838 | coding_system = Fget (coding_system, Qcoding_system); | ||
| 2836 | if (VECTORP (val) && XVECTOR (val)->size == 3) | 2839 | if (VECTORP (val) && XVECTOR (val)->size == 3) |
| 2837 | setup_coding_system (XVECTOR (val)->contents[eol_type], coding); | 2840 | setup_coding_system (XVECTOR (val)->contents[eol_type], coding); |
| 2838 | } | 2841 | } |