diff options
| author | Kenichi Handa | 1997-08-22 03:33:51 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-08-22 03:33:51 +0000 |
| commit | fb3903d3c273a8ab3e8a497e7b665ecb4162e290 (patch) | |
| tree | ef9c395cf5bddd19a086b0a28dc1f81bb9a03364 /src | |
| parent | 34317da2d4673bd4861a5858c1fa64a19832eecc (diff) | |
| download | emacs-fb3903d3c273a8ab3e8a497e7b665ecb4162e290.tar.gz emacs-fb3903d3c273a8ab3e8a497e7b665ecb4162e290.zip | |
(detect_eol): If the coding system an alias, get
eol-type from the base of it.
Diffstat (limited to 'src')
| -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 | } |