(x_set_font): Handle case of x_new_fontset returning the
authorGerd Moellmann <gerd@gnu.org>
Thu, 1 Mar 2001 12:57:24 +0000 (12:57 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 1 Mar 2001 12:57:24 +0000 (12:57 +0000)
same name as before, although there was a change in fontsets.

src/ChangeLog
src/xfns.c

index 52767b0..e817479 100644 (file)
@@ -1,9 +1,14 @@
+2001-03-01  Gerd Moellmann  <gerd@gnu.org>
+
+       * 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  <raeburn@gnu.org>
 
        * 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  <gerd@gnu.org>
 
index 2c3a16c..58a965d 100644 (file)
@@ -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);
     }