Mercurial > emacs
changeset 23210:53c330e846d0
(Ffind_charset_region): Optimization for unibyte buffer.
(Ffind_charset_string): For unibyte string, return (ascii).
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 08 Sep 1998 02:01:59 +0000 |
parents | 601bf7681009 |
children | d7bd20e02b1d |
files | src/charset.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)),