]> code.delx.au - gnu-emacs/commitdiff
(fontset_font): If we know there is no font, don't do any work.
authorChong Yidong <cyd@stupidchicken.com>
Sat, 24 Jan 2009 22:42:02 +0000 (22:42 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 24 Jan 2009 22:42:02 +0000 (22:42 +0000)
src/fontset.c

index eca79168ffb18053d888511e86f1b66f2361e335..983f4f0d0445bbf60586fcb4ed2008035e473617 100644 (file)
@@ -660,6 +660,10 @@ fontset_font (fontset, c, face, id)
   Lisp_Object rfont_def;
   Lisp_Object base_fontset;
 
+  /* If we know there is no font of C, don't do any work.  */
+  if (EQ (fontset_ref (fontset, c), Qt))
+    return Qnil;
+
   /* Try a font-group of FONTSET. */
   rfont_def = fontset_find_font (fontset, c, face, id, 0);
   if (VECTORP (rfont_def))
@@ -696,7 +700,7 @@ fontset_font (fontset, c, face, id)
        return rfont_def;
     }
 
-  /* Remeber that we have no font for C.  */
+  /* Remember that we have no font for C.  */
   FONTSET_SET (fontset, make_number (c), Qt);
 
   return Qnil;