Mercurial > emacs
changeset 100442:71dc8b382715
(font_update_drivers): Fix mistake in reconstructing the driver list.
(font_clear_cache): Fix format of font cache data.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 16 Dec 2008 03:33:00 +0000 |
parents | cb67ce776400 |
children | b4151b279e44 |
files | src/font.c |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/font.c Tue Dec 16 03:32:46 2008 +0000 +++ b/src/font.c Tue Dec 16 03:33:00 2008 +0000 @@ -2651,21 +2651,21 @@ struct font_driver *driver; { Lisp_Object tail, elt; + Lisp_Object tail2, entity; /* CACHE = (DRIVER-TYPE NUM-FRAMES FONT-CACHE-DATA ...) */ for (tail = XCDR (XCDR (cache)); CONSP (tail); tail = XCDR (tail)) { elt = XCAR (tail); - if (CONSP (elt) && FONT_SPEC_P (XCAR (elt)) && VECTORP (XCDR (elt))) + /* elt should have the form (FONT-SPEC FONT-ENTITY ...) */ + if (CONSP (elt) && FONT_SPEC_P (XCAR (elt))) { - Lisp_Object vec = XCDR (elt); - int i; - - for (i = 0; i < ASIZE (vec); i++) + for (tail2 = XCDR (elt); CONSP (tail2); tail2 = XCDR (tail2)) { - Lisp_Object entity = AREF (vec, i); - - if (EQ (driver->type, AREF (entity, FONT_TYPE_INDEX))) + entity = XCAR (tail2); + + if (FONT_ENTITY_P (entity) + && EQ (driver->type, AREF (entity, FONT_TYPE_INDEX))) { Lisp_Object objlist = AREF (entity, FONT_OBJLIST_INDEX); @@ -3586,7 +3586,7 @@ } for (list = f->font_driver_list; list; list = list->next) if (! list->on) - list_table[i] = list; + list_table[i++] = list; list_table[i] = NULL; next = &f->font_driver_list;