# HG changeset patch # User Kenichi Handa # Date 905220119 0 # Node ID 53c330e846d0fe60198c7c121fd41d442741aeaf # Parent 601bf7681009c12d573f1b8d9a6cce06dcd523c3 (Ffind_charset_region): Optimization for unibyte buffer. (Ffind_charset_string): For unibyte string, return (ascii). diff -r 601bf7681009 -r 53c330e846d0 src/charset.c --- a/src/charset.c Mon Sep 07 23:39:23 1998 +0000 +++ b/src/charset.c Tue Sep 08 02:01:59 1998 +0000 @@ -798,6 +798,11 @@ from = XFASTINT (beg); stop = to = XFASTINT (end); + if (NILP (current_buffer->enable_multibyte_characters)) + return (from == to + ? Qnil + : Fcons (Qascii, Qnil)); + if (from < GPT && GPT < to) { stop = GPT; @@ -843,7 +848,9 @@ CHECK_STRING (str, 0); if (! STRING_MULTIBYTE (str)) - return Qnil; + return (XSTRING (str)->size == 0 + ? Qnil + : Fcons (Qascii, Qnil)); bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); find_charset_in_str (XSTRING (str)->data, STRING_BYTES (XSTRING (str)),