]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_set_font_backend): Don't call Fclear_font_cache. If
authorKenichi Handa <handa@m17n.org>
Tue, 18 Dec 2007 11:43:51 +0000 (11:43 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 18 Dec 2007 11:43:51 +0000 (11:43 +0000)
none of the new drivers are available, call font_update_drviers
with the old drivers.

src/frame.c

index f081de50f2974ee6e54f0e45f017868e0e8d1baf..c5762142541efd3489c73bb6ebf4552811fed62d 100644 (file)
@@ -3492,14 +3492,16 @@ x_set_font_backend (f, new_value, old_value)
     return;
 
   if (FRAME_FONT_OBJECT (f))
-    {
-      free_all_realized_faces (Qnil);
-      Fclear_font_cache ();
-    }
+    free_all_realized_faces (Qnil);
 
-  new_value = font_update_drivers (f, new_value);
+  new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
   if (NILP (new_value))
-    error ("No font backend available");
+    {
+      if (NILP (old_value))
+       error ("No font backend available");
+      font_update_drivers (f, old_value);
+      error ("None of specified font backends are available");
+    }
   store_frame_param (f, Qfont_backend, new_value);
 
   if (FRAME_FONT_OBJECT (f))