diff options
author | Kenichi Handa <handa@m17n.org> | 2009-03-19 06:50:55 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2009-03-19 06:50:55 +0000 |
commit | 2578a3df3f88ecb22ebcb3201f4299925081c7bc (patch) | |
tree | f17190562814187f913554ce2bef79def8d4605c /src | |
parent | 6dc4ea2ffe2c046cbc21fc2649de341e1f0aa718 (diff) | |
download | emacs-2578a3df3f88ecb22ebcb3201f4299925081c7bc.tar.gz |
(x_set_font): Handle the case that ARG is a cons.
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/frame.c b/src/frame.c index 52733044f7a..a501e4de834 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3372,8 +3372,9 @@ x_set_font (f, arg, oldval) fail to use ARG as the new parameter value. */ store_frame_param (f, Qfont, oldval); - /* ARG is a fontset name, a font name, or a font object. - In the last case, this function never fail. */ + /* ARG is a fontset name, a font name, a cons of fontset name and a + font object, or a font object. In the last case, this function + never fail. */ if (STRINGP (arg)) { fontset = fs_query_fontset (arg, 0); @@ -3396,6 +3397,17 @@ x_set_font (f, arg, oldval) else error ("The default fontset can't be used for a frame font"); } + else if (CONSP (arg) && STRINGP (XCAR (arg)) && FONT_OBJECT_P (XCDR (arg))) + { + /* This is the case that the ASCII font of F's fontset XCAR + (arg) is changed to the font XCDR (arg) by + `set-fontset-font'. */ + fontset = fs_query_fontset (XCAR (arg), 0); + if (fontset < 0) + error ("Unknown fontset: %s", SDATA (XCAR (arg))); + font_object = XCDR (arg); + arg = AREF (font_object, FONT_NAME_INDEX); + } else if (FONT_OBJECT_P (arg)) { font_object = arg; |