From 48468dac8761ac6ee98234b3a10016566f03c380 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 25 Jul 2002 02:01:39 +0000 Subject: [PATCH] (Ffind_coding_systems_region_internal): Detect an ASCII only string correctly. --- src/ChangeLog | 3 +++ src/coding.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9458017fcd7..faf12117237 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-07-25 Kenichi Handa + * coding.c (Ffind_coding_systems_region_internal): Detect an + ASCII only string correctly. + * lread.c (Fload): Don't load with Qload_force_doc_strings t if version is 0. diff --git a/src/coding.c b/src/coding.c index c307b2aca25..e19319abb2c 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6438,7 +6438,7 @@ char_encodable_p (c, attrs) /* Return a list of coding systems that safely encode the text between START and END. If EXCLUDE is non-nil, it is a list of coding systems not to check. The returned list doesn't contain any such - coding systems. In any case, If the text contains only ASCII or is + coding systems. In any case, if the text contains only ASCII or is unibyte, return t. */ DEFUN ("find-coding-systems-region-internal", @@ -6457,7 +6457,7 @@ DEFUN ("find-coding-systems-region-internal", if (STRINGP (start)) { if (!STRING_MULTIBYTE (start) - && XSTRING (start)->size != STRING_BYTES (XSTRING (start))) + || XSTRING (start)->size == STRING_BYTES (XSTRING (start))) return Qt; start_byte = 0; end_byte = STRING_BYTES (XSTRING (start)); -- 2.39.5