From 57c5889c08773e37867433e36b9c5adcced0442d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 1 Mar 2001 12:57:24 +0000 Subject: [PATCH] (x_set_font): Handle case of x_new_fontset returning the same name as before, although there was a change in fontsets. --- src/ChangeLog | 7 ++++++- src/xfns.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 52767b0346..e81747972e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,9 +1,14 @@ +2001-03-01 Gerd Moellmann + + * xfns.c (x_set_font): Handle case of x_new_fontset returning the + same name as before, although there was a change in fontsets. + 2001-02-28 Ken Raeburn * lisp.h (Fframe_parameter): Declare. * window.c (set_window_buffer): Field vscroll is an int, not a - lisp object. + Lisp_Object. 2001-02-28 Gerd Moellmann diff --git a/src/xfns.c b/src/xfns.c index 2c3a16ce01..58a965d985 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1814,6 +1814,7 @@ x_set_font (f, arg, oldval) Lisp_Object result; Lisp_Object fontset_name; Lisp_Object frame; + int old_fontset = f->output_data.x->fontset; CHECK_STRING (arg, 1); @@ -1831,8 +1832,16 @@ x_set_font (f, arg, oldval) error ("The characters of the given font have varying widths"); else if (STRINGP (result)) { - if (!NILP (Fequal (result, oldval))) + if (STRINGP (fontset_name)) + { + /* Fontset names are built from ASCII font names, so the + names may be equal despite there was a change. */ + if (old_fontset == f->output_data.x->fontset) + return; + } + else if (!NILP (Fequal (result, oldval))) return; + store_frame_param (f, Qfont, result); recompute_basic_faces (f); } -- 2.20.1