diff options
author | Kenichi Handa <handa@m17n.org> | 1998-06-13 01:41:23 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1998-06-13 01:41:23 +0000 |
commit | 3f3ae9d2513c0f8f3aa31a3dfb18fdc19c099221 (patch) | |
tree | d3f9df40d995e9c8e15ddbd0632644f8d7a8d61c | |
parent | 96decf906e9e3d84134c4d4df40c5e3f022ee038 (diff) | |
download | emacs-3f3ae9d2513c0f8f3aa31a3dfb18fdc19c099221.tar.gz |
(detect_coding_system): Always return a list of HIGHEST is zero.
(Fdetect_coding_region): Doc-string adjusted for the above change.
(Fdetect_coding_string): Likewise.
-rw-r--r-- | src/coding.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c index 8ea518d3708..36376b83ede 100644 --- a/src/coding.c +++ b/src/coding.c @@ -4528,7 +4528,7 @@ detect_coding_system (src, src_bytes, highest) if (VECTORP (val2)) val = XVECTOR (val2)->contents[eol_type]; } - return val; + return (highest ? val : Fcons (val, Qnil)); } /* At first, gather possible coding systems in VAL. */ @@ -4567,8 +4567,9 @@ DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region, "Detect coding system of the text in the region between START and END.\n\ Return a list of possible coding systems ordered by priority.\n\ \n\ -If only ASCII characters are found, it returns `undecided'\n\ -or its subsidiary coding system according to a detected end-of-line format.\n\ +If only ASCII characters are found, it returns a list of single element\n\ +`undecided' or its subsidiary coding system according to a detected\n\ +end-of-line format.\n\ \n\ If optional argument HIGHEST is non-nil, return the coding system of\n\ highest priority.") @@ -4599,8 +4600,9 @@ DEFUN ("detect-coding-string", Fdetect_coding_string, Sdetect_coding_string, "Detect coding system of the text in STRING.\n\ Return a list of possible coding systems ordered by priority.\n\ \n\ -If only ASCII characters are found, it returns `undecided'\n\ -or its subsidiary coding system according to a detected end-of-line format.\n\ +If only ASCII characters are found, it returns a list of single element\n\ +`undecided' or its subsidiary coding system according to a detected\n\ +end-of-line format.\n\ \n\ If optional argument HIGHEST is non-nil, return the coding system of\n\ highest priority.") |