changeset 101447:1b4c2ecbf939

(fontset_font): If we know there is no font, don't do any work.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 24 Jan 2009 22:42:02 +0000
parents 0daf2ccd36e5
children d6d07d783be3
files src/fontset.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontset.c	Sat Jan 24 22:41:46 2009 +0000
+++ b/src/fontset.c	Sat Jan 24 22:42:02 2009 +0000
@@ -660,6 +660,10 @@
   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 @@
 	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;