# HG changeset patch # User Kenichi Handa # Date 1176797679 0 # Node ID 1ae136ad0ba0ab2620a2ae9046ee054c59a34fec # Parent 50209b69d25f0f4768cc5d6f8657f5b9a65119fb (free_realized_fontsets): Avoid unnecessary call of Fclear_face_cache. diff -r 50209b69d25f -r 1ae136ad0ba0 src/fontset.c --- a/src/fontset.c Tue Apr 17 08:14:08 2007 +0000 +++ b/src/fontset.c Tue Apr 17 08:14:39 2007 +0000 @@ -1397,9 +1397,9 @@ free_realized_fontsets (base) Lisp_Object base; { -#if 0 int id; +#if 0 /* For the moment, this doesn't work because free_realized_face doesn't remove FACE from a cache. Until we find a solution, we suppress this code, and simply use Fclear_face_cache even though @@ -1427,7 +1427,18 @@ } UNBLOCK_INPUT; #else /* not 0 */ - Fclear_face_cache (Qt); + /* But, we don't have to call Fclear_face_cache if no fontset has + been realized from BASE. */ + for (id = 0; id < ASIZE (Vfontset_table); id++) + { + Lisp_Object this = AREF (Vfontset_table, id); + + if (EQ (FONTSET_BASE (this), base)) + { + Fclear_face_cache (Qt); + break; + } + } #endif /* not 0 */ }