Mercurial > emacs
comparison src/coding.c @ 22460:7ca919476042
(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.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Sat, 13 Jun 1998 01:41:23 +0000 |
| parents | 572ba933a4bf |
| children | 627b13315f04 |
comparison
equal
deleted
inserted
replaced
| 22459:bc88a299d2fc | 22460:7ca919476042 |
|---|---|
| 4526 Lisp_Object val2; | 4526 Lisp_Object val2; |
| 4527 val2 = Fget (Qundecided, Qeol_type); | 4527 val2 = Fget (Qundecided, Qeol_type); |
| 4528 if (VECTORP (val2)) | 4528 if (VECTORP (val2)) |
| 4529 val = XVECTOR (val2)->contents[eol_type]; | 4529 val = XVECTOR (val2)->contents[eol_type]; |
| 4530 } | 4530 } |
| 4531 return val; | 4531 return (highest ? val : Fcons (val, Qnil)); |
| 4532 } | 4532 } |
| 4533 | 4533 |
| 4534 /* At first, gather possible coding systems in VAL. */ | 4534 /* At first, gather possible coding systems in VAL. */ |
| 4535 val = Qnil; | 4535 val = Qnil; |
| 4536 for (tmp = Vcoding_category_list; !NILP (tmp); tmp = XCONS (tmp)->cdr) | 4536 for (tmp = Vcoding_category_list; !NILP (tmp); tmp = XCONS (tmp)->cdr) |
| 4565 DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region, | 4565 DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region, |
| 4566 2, 3, 0, | 4566 2, 3, 0, |
| 4567 "Detect coding system of the text in the region between START and END.\n\ | 4567 "Detect coding system of the text in the region between START and END.\n\ |
| 4568 Return a list of possible coding systems ordered by priority.\n\ | 4568 Return a list of possible coding systems ordered by priority.\n\ |
| 4569 \n\ | 4569 \n\ |
| 4570 If only ASCII characters are found, it returns `undecided'\n\ | 4570 If only ASCII characters are found, it returns a list of single element\n\ |
| 4571 or its subsidiary coding system according to a detected end-of-line format.\n\ | 4571 `undecided' or its subsidiary coding system according to a detected\n\ |
| 4572 end-of-line format.\n\ | |
| 4572 \n\ | 4573 \n\ |
| 4573 If optional argument HIGHEST is non-nil, return the coding system of\n\ | 4574 If optional argument HIGHEST is non-nil, return the coding system of\n\ |
| 4574 highest priority.") | 4575 highest priority.") |
| 4575 (start, end, highest) | 4576 (start, end, highest) |
| 4576 Lisp_Object start, end, highest; | 4577 Lisp_Object start, end, highest; |
| 4597 DEFUN ("detect-coding-string", Fdetect_coding_string, Sdetect_coding_string, | 4598 DEFUN ("detect-coding-string", Fdetect_coding_string, Sdetect_coding_string, |
| 4598 1, 2, 0, | 4599 1, 2, 0, |
| 4599 "Detect coding system of the text in STRING.\n\ | 4600 "Detect coding system of the text in STRING.\n\ |
| 4600 Return a list of possible coding systems ordered by priority.\n\ | 4601 Return a list of possible coding systems ordered by priority.\n\ |
| 4601 \n\ | 4602 \n\ |
| 4602 If only ASCII characters are found, it returns `undecided'\n\ | 4603 If only ASCII characters are found, it returns a list of single element\n\ |
| 4603 or its subsidiary coding system according to a detected end-of-line format.\n\ | 4604 `undecided' or its subsidiary coding system according to a detected\n\ |
| 4605 end-of-line format.\n\ | |
| 4604 \n\ | 4606 \n\ |
| 4605 If optional argument HIGHEST is non-nil, return the coding system of\n\ | 4607 If optional argument HIGHEST is non-nil, return the coding system of\n\ |
| 4606 highest priority.") | 4608 highest priority.") |
| 4607 (string, highest) | 4609 (string, highest) |
| 4608 Lisp_Object string, highest; | 4610 Lisp_Object string, highest; |
