diff options
author | Andreas Schwab <schwab@suse.de> | 2009-02-16 13:04:15 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2009-02-16 13:04:15 +0000 |
commit | 4c1958f4a989f573680ff901798aa2f291fd26ce (patch) | |
tree | 48f3de28e0613b37a7194bf9dba29608ca17942f | |
parent | a057d86adeae70d0d54a038c012f4a238d9a7a3c (diff) | |
download | emacs-4c1958f4a989f573680ff901798aa2f291fd26ce.tar.gz |
(Fcheck_coding_systems_region): Fix test for unibyte
string.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/coding.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4a1b7f3fc19..3d86f4d1052 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-02-16 Andreas Schwab <schwab@suse.de> + + * coding.c (Fcheck_coding_systems_region): Fix test for unibyte + string. + 2009-02-16 Kenichi Handa <handa@m17n.org> * coding.c (Fcheck_coding_systems_region): Fix typo; Qt -> Qnil. diff --git a/src/coding.c b/src/coding.c index bd8c19f374a..fff4d01d890 100644 --- a/src/coding.c +++ b/src/coding.c @@ -8463,7 +8463,7 @@ START may be a string. In that case, check if the string is encodable, and the value contains indices to the string instead of buffer positions. END is ignored. -If the current buffer (or START if it is string) is unibyte, the value +If the current buffer (or START if it is a string) is unibyte, the value is nil. */) (start, end, coding_system_list) Lisp_Object start, end, coding_system_list; @@ -8478,7 +8478,7 @@ is nil. */) if (STRINGP (start)) { if (!STRING_MULTIBYTE (start) - && SCHARS (start) != SBYTES (start)) + || SCHARS (start) == SBYTES (start)) return Qnil; start_byte = 0; end_byte = SBYTES (start); |