diff options
| author | Kenichi Handa | 2008-05-14 01:23:13 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-14 01:23:13 +0000 |
| commit | dd5e1ed459dfbf690bae2e625d5b827ccbc66b50 (patch) | |
| tree | e53ac8e0337f1c628a2ca53c6906a692886d804f /src | |
| parent | 6a9c90ecda143ad3d896f797a4964fcdf51ee2ec (diff) | |
| download | emacs-dd5e1ed459dfbf690bae2e625d5b827ccbc66b50.tar.gz emacs-dd5e1ed459dfbf690bae2e625d5b827ccbc66b50.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/composite.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/composite.c b/src/composite.c index 52fae553281..b2344734c05 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -159,7 +159,6 @@ EXFUN (Fremove_list_of_text_properties, 4); | |||
| 159 | /* Temporary variable used in macros COMPOSITION_XXX. */ | 159 | /* Temporary variable used in macros COMPOSITION_XXX. */ |
| 160 | Lisp_Object composition_temp; | 160 | Lisp_Object composition_temp; |
| 161 | 161 | ||
| 162 | extern int enable_font_backend; | ||
| 163 | 162 | ||
| 164 | /* Return COMPOSITION-ID of a composition at buffer position | 163 | /* Return COMPOSITION-ID of a composition at buffer position |
| 165 | CHARPOS/BYTEPOS and length NCHARS. The `composition' property of | 164 | CHARPOS/BYTEPOS and length NCHARS. The `composition' property of |
| @@ -276,9 +275,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string) | |||
| 276 | vector or a list. It should be a sequence of: | 275 | vector or a list. It should be a sequence of: |
| 277 | char1 rule1 char2 rule2 char3 ... ruleN charN+1 */ | 276 | char1 rule1 char2 rule2 char3 ... ruleN charN+1 */ |
| 278 | 277 | ||
| 279 | #ifdef USE_FONT_BACKEND | 278 | if (VECTORP (components) |
| 280 | if (enable_font_backend | ||
| 281 | && VECTORP (components) | ||
| 282 | && ASIZE (components) >= 2 | 279 | && ASIZE (components) >= 2 |
| 283 | && VECTORP (AREF (components, 0))) | 280 | && VECTORP (AREF (components, 0))) |
| 284 | { | 281 | { |
| @@ -289,9 +286,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string) | |||
| 289 | if (! VECTORP (AREF (key, i))) | 286 | if (! VECTORP (AREF (key, i))) |
| 290 | goto invalid_composition; | 287 | goto invalid_composition; |
| 291 | } | 288 | } |
| 292 | else | 289 | else if (VECTORP (components) || CONSP (components)) |
| 293 | #endif /* USE_FONT_BACKEND */ | ||
| 294 | if (VECTORP (components) || CONSP (components)) | ||
| 295 | { | 290 | { |
| 296 | int len = XVECTOR (key)->size; | 291 | int len = XVECTOR (key)->size; |
| 297 | 292 | ||
| @@ -324,12 +319,10 @@ get_composition_id (charpos, bytepos, nchars, prop, string) | |||
| 324 | : ((INTEGERP (components) || STRINGP (components)) | 319 | : ((INTEGERP (components) || STRINGP (components)) |
| 325 | ? COMPOSITION_WITH_ALTCHARS | 320 | ? COMPOSITION_WITH_ALTCHARS |
| 326 | : COMPOSITION_WITH_RULE_ALTCHARS)); | 321 | : COMPOSITION_WITH_RULE_ALTCHARS)); |
| 327 | #ifdef USE_FONT_BACKEND | ||
| 328 | if (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS | 322 | if (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS |
| 329 | && VECTORP (components) | 323 | && VECTORP (components) |
| 330 | && ! INTEGERP (AREF (components, 0))) | 324 | && ! INTEGERP (AREF (components, 0))) |
| 331 | cmp->method = COMPOSITION_WITH_GLYPH_STRING; | 325 | cmp->method = COMPOSITION_WITH_GLYPH_STRING; |
| 332 | #endif /* USE_FONT_BACKEND */ | ||
| 333 | cmp->hash_index = hash_index; | 326 | cmp->hash_index = hash_index; |
| 334 | glyph_len = (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS | 327 | glyph_len = (cmp->method == COMPOSITION_WITH_RULE_ALTCHARS |
| 335 | ? (XVECTOR (key)->size + 1) / 2 | 328 | ? (XVECTOR (key)->size + 1) / 2 |
| @@ -338,16 +331,13 @@ get_composition_id (charpos, bytepos, nchars, prop, string) | |||
| 338 | cmp->offsets = (short *) xmalloc (sizeof (short) * glyph_len * 2); | 331 | cmp->offsets = (short *) xmalloc (sizeof (short) * glyph_len * 2); |
| 339 | cmp->font = NULL; | 332 | cmp->font = NULL; |
| 340 | 333 | ||
| 341 | #ifdef USE_FONT_BACKEND | 334 | /* Calculate the width of overall glyphs of the composition. */ |
| 342 | if (cmp->method == COMPOSITION_WITH_GLYPH_STRING) | 335 | if (cmp->method == COMPOSITION_WITH_GLYPH_STRING) |
| 343 | { | 336 | { |
| 344 | cmp->width = 1; /* Should be fixed later. */ | 337 | cmp->width = 1; /* Should be fixed later. */ |
| 345 | cmp->glyph_len--; | 338 | cmp->glyph_len--; |
| 346 | } | 339 | } |
| 347 | else | 340 | else if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS) |
| 348 | #endif /* USE_FONT_BACKEND */ | ||
| 349 | /* Calculate the width of overall glyphs of the composition. */ | ||
| 350 | if (cmp->method != COMPOSITION_WITH_RULE_ALTCHARS) | ||
| 351 | { | 341 | { |
| 352 | /* Relative composition. */ | 342 | /* Relative composition. */ |
| 353 | cmp->width = 0; | 343 | cmp->width = 0; |
| @@ -652,12 +642,6 @@ compose_text (start, end, components, modification_func, string) | |||
| 652 | { | 642 | { |
| 653 | Lisp_Object prop; | 643 | Lisp_Object prop; |
| 654 | 644 | ||
| 655 | #if 0 | ||
| 656 | if (VECTORP (components) && ASIZE (components) > 1 | ||
| 657 | && VECTORP (AREF (components, 0))) | ||
| 658 | prop = components; | ||
| 659 | else | ||
| 660 | #endif /* USE_FONT_BACKEND */ | ||
| 661 | prop = Fcons (Fcons (make_number (end - start), components), | 645 | prop = Fcons (Fcons (make_number (end - start), components), |
| 662 | modification_func); | 646 | modification_func); |
| 663 | Fput_text_property (make_number (start), make_number (end), | 647 | Fput_text_property (make_number (start), make_number (end), |