changeset 109069:325f0ae2b5bf

xfns.c (x_default_font_parameter): Remove got_from_system (Bug#6526).
author Jan D <jan.h.d@swipnet.se>
date Mon, 28 Jun 2010 14:46:39 +0200
parents 32d208ab8937
children 012ef7d8f2be
files src/ChangeLog src/xfns.c
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Jun 28 12:15:34 2010 +0200
+++ b/src/ChangeLog	Mon Jun 28 14:46:39 2010 +0200
@@ -1,5 +1,8 @@
 2010-06-28  Jan Djärv  <jan.h.d@swipnet.se>
 
+	* xfns.c (x_default_font_parameter): Remove got_from_system
+	(Bug#6526).
+
 	* xterm.h (gtk_widget_get_window, gtk_widget_get_mapped)
 	(gtk_adjustment_get_page_size, gtk_adjustment_get_upper): New
 	defines based on what configure finds.
--- a/src/xfns.c	Mon Jun 28 12:15:34 2010 +0200
+++ b/src/xfns.c	Mon Jun 28 14:46:39 2010 +0200
@@ -3067,13 +3067,12 @@
   Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
                                       RES_TYPE_STRING);
   Lisp_Object font = Qnil;
-  int got_from_system = 0;
   if (EQ (font_param, Qunbound))
     font_param = Qnil;
 
   if (NILP (font_param))
     {
-      /* System font takes precedendce over X resources.  We must suggest this
+      /* System font should take precedendce over X resources.  We suggest this
          regardless of font-use-system-font because .emacs may not have been
          read yet.  */
       const char *system_font = xsettings_get_system_font ();
@@ -3081,7 +3080,6 @@
         {
           char *name = xstrdup (system_font);
           font = font_open_by_name (f, name);
-          got_from_system = ! NILP (font);
           free (name);
         }
     }
@@ -3127,10 +3125,8 @@
       x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil));
     }
 
-  x_default_parameter (f, parms, Qfont, font,
-                       got_from_system ? NULL : "font",
-                       got_from_system ? NULL : "Font",
-                       RES_TYPE_STRING);
+  /* This call will make X resources override any system font setting.  */
+  x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING);
 }