Mercurial > emacs
comparison src/coding.c @ 102055:4d3a5c88cb2b
(Fcheck_coding_systems_region): Fix typo; Qt -> Qnil.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Mon, 16 Feb 2009 11:52:57 +0000 |
| parents | 97c9e9322753 |
| children | 4f60db600648 |
comparison
equal
deleted
inserted
replaced
| 102054:c35aac5fa64e | 102055:4d3a5c88cb2b |
|---|---|
| 8459 If all coding systems in CODING-SYSTEM-LIST can encode the region, the | 8459 If all coding systems in CODING-SYSTEM-LIST can encode the region, the |
| 8460 value is nil. | 8460 value is nil. |
| 8461 | 8461 |
| 8462 START may be a string. In that case, check if the string is | 8462 START may be a string. In that case, check if the string is |
| 8463 encodable, and the value contains indices to the string instead of | 8463 encodable, and the value contains indices to the string instead of |
| 8464 buffer positions. END is ignored. */) | 8464 buffer positions. END is ignored. |
| 8465 | |
| 8466 If the current buffer (or START if it is string) is unibyte, the value | |
| 8467 is nil. */) | |
| 8465 (start, end, coding_system_list) | 8468 (start, end, coding_system_list) |
| 8466 Lisp_Object start, end, coding_system_list; | 8469 Lisp_Object start, end, coding_system_list; |
| 8467 { | 8470 { |
| 8468 Lisp_Object list; | 8471 Lisp_Object list; |
| 8469 EMACS_INT start_byte, end_byte; | 8472 EMACS_INT start_byte, end_byte; |
| 8490 if (NILP (current_buffer->enable_multibyte_characters)) | 8493 if (NILP (current_buffer->enable_multibyte_characters)) |
| 8491 return Qnil; | 8494 return Qnil; |
| 8492 start_byte = CHAR_TO_BYTE (XINT (start)); | 8495 start_byte = CHAR_TO_BYTE (XINT (start)); |
| 8493 end_byte = CHAR_TO_BYTE (XINT (end)); | 8496 end_byte = CHAR_TO_BYTE (XINT (end)); |
| 8494 if (XINT (end) - XINT (start) == end_byte - start_byte) | 8497 if (XINT (end) - XINT (start) == end_byte - start_byte) |
| 8495 return Qt; | 8498 return Qnil; |
| 8496 | 8499 |
| 8497 if (XINT (start) < GPT && XINT (end) > GPT) | 8500 if (XINT (start) < GPT && XINT (end) > GPT) |
| 8498 { | 8501 { |
| 8499 if ((GPT - XINT (start)) < (XINT (end) - GPT)) | 8502 if ((GPT - XINT (start)) < (XINT (end) - GPT)) |
| 8500 move_gap_both (XINT (start), start_byte); | 8503 move_gap_both (XINT (start), start_byte); |
