diff options
Diffstat (limited to 'src/fontset.c')
| -rw-r--r-- | src/fontset.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fontset.c b/src/fontset.c index 3091f43d6e9..c8ae1e74848 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -447,7 +447,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) | |||
| 447 | /* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for | 447 | /* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for |
| 448 | character C in FONTSET. If C is -1, return a fallback font-group. | 448 | character C in FONTSET. If C is -1, return a fallback font-group. |
| 449 | If C is not -1, the value may be Qt (FONTSET doesn't have a font | 449 | If C is not -1, the value may be Qt (FONTSET doesn't have a font |
| 450 | for C even in the fallback group, or 0 (a font for C may be found | 450 | for C even in the fallback group), or 0 (a font for C may be found |
| 451 | only in the fallback group). */ | 451 | only in the fallback group). */ |
| 452 | 452 | ||
| 453 | static Lisp_Object | 453 | static Lisp_Object |
| @@ -465,7 +465,9 @@ fontset_get_font_group (Lisp_Object fontset, int c) | |||
| 465 | if (! NILP (font_group)) | 465 | if (! NILP (font_group)) |
| 466 | return font_group; | 466 | return font_group; |
| 467 | base_fontset = FONTSET_BASE (fontset); | 467 | base_fontset = FONTSET_BASE (fontset); |
| 468 | if (c >= 0) | 468 | if (NILP (base_fontset)) |
| 469 | font_group = Qnil; | ||
| 470 | else if (c >= 0) | ||
| 469 | font_group = char_table_ref_and_range (base_fontset, c, &from, &to); | 471 | font_group = char_table_ref_and_range (base_fontset, c, &from, &to); |
| 470 | else | 472 | else |
| 471 | font_group = FONTSET_FALLBACK (base_fontset); | 473 | font_group = FONTSET_FALLBACK (base_fontset); |
| @@ -476,6 +478,8 @@ fontset_get_font_group (Lisp_Object fontset, int c) | |||
| 476 | char_table_set_range (fontset, from, to, font_group); | 478 | char_table_set_range (fontset, from, to, font_group); |
| 477 | return font_group; | 479 | return font_group; |
| 478 | } | 480 | } |
| 481 | if (!VECTORP (font_group)) | ||
| 482 | return font_group; | ||
| 479 | font_group = Fcopy_sequence (font_group); | 483 | font_group = Fcopy_sequence (font_group); |
| 480 | for (i = 0; i < ASIZE (font_group); i++) | 484 | for (i = 0; i < ASIZE (font_group); i++) |
| 481 | if (! NILP (AREF (font_group, i))) | 485 | if (! NILP (AREF (font_group, i))) |
| @@ -2100,6 +2104,8 @@ DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0, | |||
| 2100 | 2104 | ||
| 2101 | #ifdef FONTSET_DEBUG | 2105 | #ifdef FONTSET_DEBUG |
| 2102 | 2106 | ||
| 2107 | Lisp_Object dump_fontset (Lisp_Object) EXTERNALLY_VISIBLE; | ||
| 2108 | |||
| 2103 | Lisp_Object | 2109 | Lisp_Object |
| 2104 | dump_fontset (Lisp_Object fontset) | 2110 | dump_fontset (Lisp_Object fontset) |
| 2105 | { | 2111 | { |