aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-03-19 06:51:07 +0000
committerKenichi Handa2009-03-19 06:51:07 +0000
commitd507f8d743e54850885e1f946ab7ed5a007e2b7b (patch)
tree624749eeb21b564c613463c1a997e70ccf2888b7 /src
parent0875632e0069c5f841081671cee8e768a0f30677 (diff)
downloademacs-d507f8d743e54850885e1f946ab7ed5a007e2b7b.tar.gz
emacs-d507f8d743e54850885e1f946ab7ed5a007e2b7b.zip
(x_set_font): Handle the case that ARG is a cons.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/frame.c16
2 files changed, 22 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 33be1d20ea4..7017875564b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12009-03-19 Kenichi Handa <handa@m17n.org>
2
3 * fontset.c (Fset_fontset_font): When a spec of ASCII font is
4 changed, use font_load_for_lface to get a new font object. Call
5 free_realized_fontset after handling ASCII font change.
6
7 * frame.c (x_set_font): Handle the case that ARG is a cons.
8
12009-03-19 Glenn Morris <rgm@gnu.org> 92009-03-19 Glenn Morris <rgm@gnu.org>
2 10
3 * fileio.c (Fsubstitute_in_file_name): Doc fix. 11 * fileio.c (Fsubstitute_in_file_name): Doc fix.
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)
3372 fail to use ARG as the new parameter value. */ 3372 fail to use ARG as the new parameter value. */
3373 store_frame_param (f, Qfont, oldval); 3373 store_frame_param (f, Qfont, oldval);
3374 3374
3375 /* ARG is a fontset name, a font name, or a font object. 3375 /* ARG is a fontset name, a font name, a cons of fontset name and a
3376 In the last case, this function never fail. */ 3376 font object, or a font object. In the last case, this function
3377 never fail. */
3377 if (STRINGP (arg)) 3378 if (STRINGP (arg))
3378 { 3379 {
3379 fontset = fs_query_fontset (arg, 0); 3380 fontset = fs_query_fontset (arg, 0);
@@ -3396,6 +3397,17 @@ x_set_font (f, arg, oldval)
3396 else 3397 else
3397 error ("The default fontset can't be used for a frame font"); 3398 error ("The default fontset can't be used for a frame font");
3398 } 3399 }
3400 else if (CONSP (arg) && STRINGP (XCAR (arg)) && FONT_OBJECT_P (XCDR (arg)))
3401 {
3402 /* This is the case that the ASCII font of F's fontset XCAR
3403 (arg) is changed to the font XCDR (arg) by
3404 `set-fontset-font'. */
3405 fontset = fs_query_fontset (XCAR (arg), 0);
3406 if (fontset < 0)
3407 error ("Unknown fontset: %s", SDATA (XCAR (arg)));
3408 font_object = XCDR (arg);
3409 arg = AREF (font_object, FONT_NAME_INDEX);
3410 }
3399 else if (FONT_OBJECT_P (arg)) 3411 else if (FONT_OBJECT_P (arg))
3400 { 3412 {
3401 font_object = arg; 3413 font_object = arg;