# HG changeset patch # User Gerd Moellmann # Date 983451386 0 # Node ID 59630511a7747390dc51f04a8ed73ff1967d31c9 # Parent 904a83f1b00b32e69d4b652159bf975be930ecbf (x_set_font): Handle case of x_new_fontset returning the same name as before, although there was a change in fontsets. diff -r 904a83f1b00b -r 59630511a774 src/xfns.c --- a/src/xfns.c Wed Feb 28 17:43:49 2001 +0000 +++ b/src/xfns.c Thu Mar 01 12:56:26 2001 +0000 @@ -1814,6 +1814,7 @@ 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 @@ 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); }