Commit dd5e1ed4 authored by Kenichi Handa's avatar Kenichi Handa

Throughout the file, delete all USE_FONT_BACKEND

conditionals.  Don't check enable_font_backend.  Delete all codes
used only when USE_FONT_BACKEND is not defined.
parent 6a9c90ec
...@@ -159,7 +159,6 @@ EXFUN (Fremove_list_of_text_properties, 4); ...@@ -159,7 +159,6 @@ EXFUN (Fremove_list_of_text_properties, 4);
/* Temporary variable used in macros COMPOSITION_XXX. */ /* Temporary variable used in macros COMPOSITION_XXX. */
Lisp_Object composition_temp; Lisp_Object composition_temp;
extern int enable_font_backend;
/* Return COMPOSITION-ID of a composition at buffer position /* Return COMPOSITION-ID of a composition at buffer position
CHARPOS/BYTEPOS and length NCHARS. The `composition' property of CHARPOS/BYTEPOS and length NCHARS. The `composition' property of
...@@ -276,9 +275,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string) ...@@ -276,9 +275,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
vector or a list. It should be a sequence of: vector or a list. It should be a sequence of:
char1 rule1 char2 rule2 char3 ... ruleN charN+1 */ char1 rule1 char2 rule2 char3 ... ruleN charN+1 */
#ifdef USE_FONT_BACKEND if (VECTORP (components)
if (enable_font_backend
&& VECTORP (components)
&& ASIZE (components) >= 2 && ASIZE (components) >= 2
&& VECTORP (AREF (components, 0))) && VECTORP (AREF (components, 0)))
{ {
...@@ -289,9 +286,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string) ...@@ -289,9 +286,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
if (! VECTORP (AREF (key, i))) if (! VECTORP (AREF (key, i)))
goto invalid_composition; goto invalid_composition;
} }
else else if (VECTORP (components) || CONSP (components))
#endif /* USE_FONT_BACKEND */
if (VECTORP (components) || CONSP (components))
{ {
int len = XVECTOR (key)->size; int len = XVECTOR (key)->size;
...@@ -324,12 +319,10 @@ get_composition_id (charpos, bytepos, nchars, prop, string) ...@@ -324,12 +319,10 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
: ((INTEGERP (components) || STRINGP (components)) : ((INTEGERP (components) || STRINGP (components))
? COMPOSITION_WITH_ALTCHARS ? COMPOSITION_WITH_ALTCHARS
: COMPOSITION_WITH_RULE_ALTCHARS)); : COMPOSITION_WITH_RULE_ALTCHARS));
#ifdef USE_FONT_BACKEND
if (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS if (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS
&& VECTORP (components) && VECTORP (components)
&& ! INTEGERP (AREF (components, 0))) && ! INTEGERP (AREF (components, 0)))
cmp->method = COMPOSITION_WITH_GLYPH_STRING; cmp->method = COMPOSITION_WITH_GLYPH_STRING;
#endif /* USE_FONT_BACKEND */
cmp->hash_index = hash_index; cmp->hash_index = hash_index;
glyph_len = (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS glyph_len = (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS
? (XVECTOR (key)->size + 1) / 2 ? (XVECTOR (key)->size + 1) / 2
...@@ -338,16 +331,13 @@ get_composition_id (charpos, bytepos, nchars, prop, string) ...@@ -338,16 +331,13 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
cmp->offsets = (short *) xmalloc (sizeof (short) * glyph_len * 2); cmp->offsets = (short *) xmalloc (sizeof (short) * glyph_len * 2);
cmp->font = NULL; cmp->font = NULL;
#ifdef USE_FONT_BACKEND /* Calculate the width of overall glyphs of the composition. */
if (cmp->method == COMPOSITION_WITH_GLYPH_STRING) if (cmp->method == COMPOSITION_WITH_GLYPH_STRING)
{ {
cmp->width = 1; /* Should be fixed later. */ cmp->width = 1; /* Should be fixed later. */
cmp->glyph_len--; cmp->glyph_len--;
} }
else else if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS)
#endif /* USE_FONT_BACKEND */
/* Calculate the width of overall glyphs of the composition. */
if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS)
{ {
/* Relative composition. */ /* Relative composition. */
cmp->width = 0; cmp->width = 0;
...@@ -652,12 +642,6 @@ compose_text (start, end, components, modification_func, string) ...@@ -652,12 +642,6 @@ compose_text (start, end, components, modification_func, string)
{ {
Lisp_Object prop; Lisp_Object prop;
#if 0
if (VECTORP (components) && ASIZE (components) > 1
&& VECTORP (AREF (components, 0)))
prop = components;
else
#endif /* USE_FONT_BACKEND */
prop = Fcons (Fcons (make_number (end - start), components), prop = Fcons (Fcons (make_number (end - start), components),
modification_func); modification_func);
Fput_text_property (make_number (start), make_number (end), Fput_text_property (make_number (start), make_number (end),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment