diff options
| author | Kenichi Handa | 2007-04-17 08:14:39 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2007-04-17 08:14:39 +0000 |
| commit | 2f034212cd4a3dad17f699010a57ba8d009bc60f (patch) | |
| tree | dac80428936124f95652c7f344a20ab9f8cd14e9 /src/fontset.c | |
| parent | a0b61ddb639b36dbdfe403d61732e69df9853cf5 (diff) | |
| download | emacs-2f034212cd4a3dad17f699010a57ba8d009bc60f.tar.gz emacs-2f034212cd4a3dad17f699010a57ba8d009bc60f.zip | |
(free_realized_fontsets): Avoid unnecessary call of
Fclear_face_cache.
Diffstat (limited to 'src/fontset.c')
| -rw-r--r-- | src/fontset.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fontset.c b/src/fontset.c index a7bf7de943f..279ecb56c03 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1397,9 +1397,9 @@ static void | |||
| 1397 | free_realized_fontsets (base) | 1397 | free_realized_fontsets (base) |
| 1398 | Lisp_Object base; | 1398 | Lisp_Object base; |
| 1399 | { | 1399 | { |
| 1400 | #if 0 | ||
| 1401 | int id; | 1400 | int id; |
| 1402 | 1401 | ||
| 1402 | #if 0 | ||
| 1403 | /* For the moment, this doesn't work because free_realized_face | 1403 | /* For the moment, this doesn't work because free_realized_face |
| 1404 | doesn't remove FACE from a cache. Until we find a solution, we | 1404 | doesn't remove FACE from a cache. Until we find a solution, we |
| 1405 | suppress this code, and simply use Fclear_face_cache even though | 1405 | suppress this code, and simply use Fclear_face_cache even though |
| @@ -1427,7 +1427,18 @@ free_realized_fontsets (base) | |||
| 1427 | } | 1427 | } |
| 1428 | UNBLOCK_INPUT; | 1428 | UNBLOCK_INPUT; |
| 1429 | #else /* not 0 */ | 1429 | #else /* not 0 */ |
| 1430 | Fclear_face_cache (Qt); | 1430 | /* But, we don't have to call Fclear_face_cache if no fontset has |
| 1431 | been realized from BASE. */ | ||
| 1432 | for (id = 0; id < ASIZE (Vfontset_table); id++) | ||
| 1433 | { | ||
| 1434 | Lisp_Object this = AREF (Vfontset_table, id); | ||
| 1435 | |||
| 1436 | if (EQ (FONTSET_BASE (this), base)) | ||
| 1437 | { | ||
| 1438 | Fclear_face_cache (Qt); | ||
| 1439 | break; | ||
| 1440 | } | ||
| 1441 | } | ||
| 1431 | #endif /* not 0 */ | 1442 | #endif /* not 0 */ |
| 1432 | } | 1443 | } |
| 1433 | 1444 | ||