changeset 101553:a44c0bbce387

(font_for_char): Use assq_no_quit, not assoc_no_quit. (Ffontset_font): Adjusted for the change of fontset entry.
author Kenichi Handa <handa@m17n.org>
date Tue, 27 Jan 2009 05:07:04 +0000
parents 095c55c0882d
children 52affc17c7cf
files src/fontset.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontset.c	Tue Jan 27 04:49:33 2009 +0000
+++ b/src/fontset.c	Tue Jan 27 05:07:04 2009 +0000
@@ -898,7 +898,7 @@
 	{
 	  Lisp_Object val;
 
-	  val = assoc_no_quit (charset, Vfont_encoding_charset_alist);
+	  val = assq_no_quit (charset, Vfont_encoding_charset_alist);
 	  if (CONSP (val) && CHARSETP (XCDR (val)))
 	    charset = XCDR (val);
 	  id = XINT (CHARSET_SYMBOL_ID (charset));
@@ -1955,6 +1955,8 @@
 	if (VECTORP (elt))
 	  for (j = 0; j < ASIZE (elt); j++)
 	    {
+	      Lisp_Object family, registry;
+
 	      val = AREF (elt, j);
 	      repertory = AREF (val, 1);
 	      if (INTEGERP (repertory))
@@ -1970,7 +1972,14 @@
 		    continue;
 		}
 	      val = AREF (val, 0);
-	      val = Fcons (AREF (val, 0), AREF (val, 5));
+	      /* VAL is a FONT-SPEC */
+	      family = AREF (val, FONT_FAMILY_INDEX);
+	      if (! NILP (family))
+		family = SYMBOL_NAME (family);
+	      registry = AREF (val, FONT_REGISTRY_INDEX);
+	      if (! NILP (registry))
+		registry = SYMBOL_NAME (registry);
+	      val = Fcons (family, registry);
 	      if (NILP (all))
 		return val;
 	      list = Fcons (val, list);