summaryrefslogtreecommitdiff
path: root/src/fontset.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-08-09 18:13:11 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-08-09 18:13:11 -0400
commit7be1c708c5abc7dea388d45454bd19bff07b7943 (patch)
tree4d86b007b24388f25e83515bd86c42d14de9b77a /src/fontset.c
parentebb552ed380b9f04e0c6b29374b3d32435837951 (diff)
parent8d96c9a4e700ad17921f8d2c90f4244bfa4b98b1 (diff)
downloademacs-7be1c708c5abc7dea388d45454bd19bff07b7943.tar.gz
emacs-7be1c708c5abc7dea388d45454bd19bff07b7943.tar.bz2
emacs-7be1c708c5abc7dea388d45454bd19bff07b7943.zip
Merge from emacs-23 branch
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 74eb61d2665..c8ae1e74848 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -447,7 +447,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
/* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for
character C in FONTSET. If C is -1, return a fallback font-group.
If C is not -1, the value may be Qt (FONTSET doesn't have a font
- for C even in the fallback group, or 0 (a font for C may be found
+ for C even in the fallback group), or 0 (a font for C may be found
only in the fallback group). */
static Lisp_Object
@@ -465,7 +465,9 @@ fontset_get_font_group (Lisp_Object fontset, int c)
if (! NILP (font_group))
return font_group;
base_fontset = FONTSET_BASE (fontset);
- if (c >= 0)
+ if (NILP (base_fontset))
+ font_group = Qnil;
+ else if (c >= 0)
font_group = char_table_ref_and_range (base_fontset, c, &from, &to);
else
font_group = FONTSET_FALLBACK (base_fontset);
@@ -476,6 +478,8 @@ fontset_get_font_group (Lisp_Object fontset, int c)
char_table_set_range (fontset, from, to, font_group);
return font_group;
}
+ if (!VECTORP (font_group))
+ return font_group;
font_group = Fcopy_sequence (font_group);
for (i = 0; i < ASIZE (font_group); i++)
if (! NILP (AREF (font_group, i)))