(compose_chars_in_text): Delete it.
authorKenichi Handa <handa@m17n.org>
Tue, 13 Sep 2005 01:07:30 +0000 (01:07 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 13 Sep 2005 01:07:30 +0000 (01:07 +0000)
src/ChangeLog
src/composite.c

index dc09f25..4c97d75 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-13  Kenichi Handa  <handa@m17n.org>
+
+       * composite.c (compose_chars_in_text): Delete it.
+
+       * composite.h (compose_chars_in_text): Delete extern.
+
 2005-09-13  Kim F. Storm  <storm@cua.dk>
 
        * print.c (print_error_message): Fix last change.
index 02abb66..f03d505 100644 (file)
@@ -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;
-}
 \f
 /* Emacs Lisp APIs.  */