diff options
| author | Kenichi Handa | 2001-02-24 02:45:00 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2001-02-24 02:45:00 +0000 |
| commit | 41d79f4d2b18fd016b5dceb73b90a01d94d61409 (patch) | |
| tree | 79324162abc4795e24fd289996af13fcbfc5d4d3 /src | |
| parent | 66c56ed161e7a30bb22b27b20de54f0d86813476 (diff) | |
| download | emacs-41d79f4d2b18fd016b5dceb73b90a01d94d61409.tar.gz emacs-41d79f4d2b18fd016b5dceb73b90a01d94d61409.zip | |
(Fnew_fontset): Fix handling of the case that an
element of FONTLIST is a cons of family and registry.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fontset.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/fontset.c b/src/fontset.c index 51980e69b78..5797c8d3dfa 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -899,10 +899,14 @@ FONTLIST is an alist of charsets vs corresponding font name patterns.") | |||
| 899 | tem = XCAR (tail); | 899 | tem = XCAR (tail); |
| 900 | if (!CONSP (tem) | 900 | if (!CONSP (tem) |
| 901 | || (charset = get_charset_id (XCAR (tem))) < 0 | 901 | || (charset = get_charset_id (XCAR (tem))) < 0 |
| 902 | || !STRINGP (XCDR (tem))) | 902 | || (!STRINGP (XCDR (tem)) && !CONSP (XCDR (tem)))) |
| 903 | error ("Elements of fontlist must be a cons of charset and font name"); | 903 | error ("Elements of fontlist must be a cons of charset and font name pattern"); |
| 904 | 904 | ||
| 905 | tem = Fdowncase (XCDR (tem)); | 905 | tem = XCDR (tem); |
| 906 | if (STRINGP (tem)) | ||
| 907 | tem = Fdowncase (tem); | ||
| 908 | else | ||
| 909 | tem = Fcons (Fdowncase (Fcar (tem)), Fdowncase (Fcdr (tem))); | ||
| 906 | if (charset == CHARSET_ASCII) | 910 | if (charset == CHARSET_ASCII) |
| 907 | ascii_font = tem; | 911 | ascii_font = tem; |
| 908 | else | 912 | else |
| @@ -920,7 +924,10 @@ FONTLIST is an alist of charsets vs corresponding font name patterns.") | |||
| 920 | for (; CONSP (elements); elements = XCDR (elements)) | 924 | for (; CONSP (elements); elements = XCDR (elements)) |
| 921 | { | 925 | { |
| 922 | elt = XCAR (elements); | 926 | elt = XCAR (elements); |
| 923 | tem = Fcons (XCAR (elt), font_family_registry (XCDR (elt), 0)); | 927 | tem = XCDR (elt); |
| 928 | if (STRINGP (tem)) | ||
| 929 | tem = font_family_registry (tem, 0); | ||
| 930 | tem = Fcons (XCAR (elt), tem); | ||
| 924 | FONTSET_SET (fontset, XINT (XCAR (elt)), tem); | 931 | FONTSET_SET (fontset, XINT (XCAR (elt)), tem); |
| 925 | } | 932 | } |
| 926 | 933 | ||