From: Kenichi Handa Date: Tue, 13 Sep 2005 01:07:30 +0000 (+0000) Subject: (compose_chars_in_text): Delete it. X-Git-Tag: emacs-pretest-22.0.90~7126 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d008f7b7facd8851792d896be00d39ae1b1b2a5f;p=emacs.git (compose_chars_in_text): Delete it. --- diff --git a/src/ChangeLog b/src/ChangeLog index dc09f25353e..4c97d751c45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-09-13 Kenichi Handa + + * composite.c (compose_chars_in_text): Delete it. + + * composite.h (compose_chars_in_text): Delete extern. + 2005-09-13 Kim F. Storm * print.c (print_error_message): Fix last change. diff --git a/src/composite.c b/src/composite.c index 02abb66e1e5..f03d5054c33 100644 --- a/src/composite.c +++ b/src/composite.c @@ -589,132 +589,6 @@ compose_text (start, end, components, modification_func, string) Qcomposition, prop, string); } -/* Compose sequences of characters in the region between START and END - by functions registered in Vcomposition_function_table. If STRING - is non-nil, operate on characters contained between indices START - and END in STRING. */ - -void -compose_chars_in_text (start, end, string) - int start, end; - Lisp_Object string; -{ - int count = 0; - struct gcpro gcpro1; - Lisp_Object tail, elt, val, to; - /* Set to nonzero if we don't have to compose ASCII characters. */ - int skip_ascii; - int i, len, stop, c; - const unsigned char *ptr, *pend; - - if (! CHAR_TABLE_P (Vcomposition_function_table)) - return; - - if (STRINGP (string)) - { - count = SPECPDL_INDEX (); - GCPRO1 (string); - stop = end; - ptr = SDATA (string) + string_char_to_byte (string, start); - pend = SDATA (string) + SBYTES (string); - } - else - { - record_unwind_protect (save_excursion_restore, save_excursion_save ()); - TEMP_SET_PT (start); - stop = (start < GPT && GPT < end ? GPT : end); - ptr = CHAR_POS_ADDR (start); - pend = CHAR_POS_ADDR (end); - } - - /* Preserve the match data. */ - record_unwind_save_match_data (); - - /* If none of ASCII characters have composition functions, we can - skip them quickly. */ - for (i = 0; i < 128; i++) - if (!NILP (CHAR_TABLE_REF (Vcomposition_function_table, i))) - break; - skip_ascii = (i == 128); - - - while (1) - { - if (skip_ascii) - while (start < stop && ASCII_BYTE_P (*ptr)) - start++, ptr++; - - if (start >= stop) - { - if (stop == end || start >= end) - break; - stop = end; - if (STRINGP (string)) - ptr = SDATA (string) + string_char_to_byte (string, start); - else - ptr = CHAR_POS_ADDR (start); - } - - c = STRING_CHAR_AND_LENGTH (ptr, pend - ptr, len); - tail = CHAR_TABLE_REF (Vcomposition_function_table, c); - while (CONSP (tail)) - { - elt = XCAR (tail); - if (CONSP (elt) - && STRINGP (XCAR (elt)) - && !NILP (Ffboundp (XCDR (elt)))) - { - if (STRINGP (string)) - val = Fstring_match (XCAR (elt), string, make_number (start)); - else - { - val = Flooking_at (XCAR (elt)); - if (!NILP (val)) - val = make_number (start); - } - if (INTEGERP (val) && XFASTINT (val) == start) - { - to = Fmatch_end (make_number (0)); - val = call4 (XCDR (elt), val, to, XCAR (elt), string); - if (INTEGERP (val) && XINT (val) > 1) - { - start += XINT (val); - if (STRINGP (string)) - { - ptr = SDATA (string) + string_char_to_byte (string, start); - pend = SDATA (string) + SBYTES (string); - } - else - ptr = CHAR_POS_ADDR (start); - } - else if (STRINGP (string)) - { - start++; - ptr = SDATA (string) + string_char_to_byte (string, start); - pend = SDATA (string) + SBYTES (string); - } - else - { - start++; - ptr += len; - } - break; - } - } - tail = XCDR (tail); - } - if (!CONSP (tail)) - { - /* No composition done. Try the next character. */ - start++; - ptr += len; - } - } - - unbind_to (count, Qnil); - if (STRINGP (string)) - UNGCPRO; -} /* Emacs Lisp APIs. */