comparison src/coding.c @ 102058:4f60db600648

(Fcheck_coding_systems_region): Fix test for unibyte string.
author Andreas Schwab <schwab@suse.de>
date Mon, 16 Feb 2009 13:04:15 +0000
parents 4d3a5c88cb2b
children a5023e8bbb1e
comparison
equal deleted inserted replaced
102057:029504da9ca8 102058:4f60db600648
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 8465
8466 If the current buffer (or START if it is string) is unibyte, the value 8466 If the current buffer (or START if it is a string) is unibyte, the value
8467 is nil. */) 8467 is nil. */)
8468 (start, end, coding_system_list) 8468 (start, end, coding_system_list)
8469 Lisp_Object start, end, coding_system_list; 8469 Lisp_Object start, end, coding_system_list;
8470 { 8470 {
8471 Lisp_Object list; 8471 Lisp_Object list;
8476 Lisp_Object tail, elt, attrs; 8476 Lisp_Object tail, elt, attrs;
8477 8477
8478 if (STRINGP (start)) 8478 if (STRINGP (start))
8479 { 8479 {
8480 if (!STRING_MULTIBYTE (start) 8480 if (!STRING_MULTIBYTE (start)
8481 && SCHARS (start) != SBYTES (start)) 8481 || SCHARS (start) == SBYTES (start))
8482 return Qnil; 8482 return Qnil;
8483 start_byte = 0; 8483 start_byte = 0;
8484 end_byte = SBYTES (start); 8484 end_byte = SBYTES (start);
8485 pos = 0; 8485 pos = 0;
8486 } 8486 }