# HG changeset patch # User Kenichi Handa # Date 982982700 0 # Node ID 751cb07c5f1194f99669d69a3c75e420d0d78483 # Parent 8563da6180ae09b5f74e33d11a72f5f826c5304c (Fnew_fontset): Fix handling of the case that an element of FONTLIST is a cons of family and registry. diff -r 8563da6180ae -r 751cb07c5f11 src/fontset.c --- a/src/fontset.c Sat Feb 24 02:44:38 2001 +0000 +++ b/src/fontset.c Sat Feb 24 02:45:00 2001 +0000 @@ -899,10 +899,14 @@ tem = XCAR (tail); if (!CONSP (tem) || (charset = get_charset_id (XCAR (tem))) < 0 - || !STRINGP (XCDR (tem))) - error ("Elements of fontlist must be a cons of charset and font name"); + || (!STRINGP (XCDR (tem)) && !CONSP (XCDR (tem)))) + error ("Elements of fontlist must be a cons of charset and font name pattern"); - tem = Fdowncase (XCDR (tem)); + tem = XCDR (tem); + if (STRINGP (tem)) + tem = Fdowncase (tem); + else + tem = Fcons (Fdowncase (Fcar (tem)), Fdowncase (Fcdr (tem))); if (charset == CHARSET_ASCII) ascii_font = tem; else @@ -920,7 +924,10 @@ for (; CONSP (elements); elements = XCDR (elements)) { elt = XCAR (elements); - tem = Fcons (XCAR (elt), font_family_registry (XCDR (elt), 0)); + tem = XCDR (elt); + if (STRINGP (tem)) + tem = font_family_registry (tem, 0); + tem = Fcons (XCAR (elt), tem); FONTSET_SET (fontset, XINT (XCAR (elt)), tem); }