aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xsettings.c9
2 files changed, 13 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ef97e097bf0..4b3b64f74bb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12009-11-17 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xsettings.c (something_changedCB, Ffont_get_system_font): Check
4 use_system_font.
5 (syms_of_xsettings): DEFVAR font-use-system-font.
6
12009-11-17 Andreas Schwab <schwab@linux-m68k.org> 72009-11-17 Andreas Schwab <schwab@linux-m68k.org>
2 8
3 * xfns.c (x_default_font_parameter): Remove dead assignment. 9 * xfns.c (x_default_font_parameter): Remove dead assignment.
diff --git a/src/xsettings.c b/src/xsettings.c
index 99ddd004718..71a7eaa86ca 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -40,6 +40,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
40static char *current_mono_font; 40static char *current_mono_font;
41static struct x_display_info *first_dpyinfo; 41static struct x_display_info *first_dpyinfo;
42static Lisp_Object Qfont_name, Qfont_render; 42static Lisp_Object Qfont_name, Qfont_render;
43static int use_system_font;
43 44
44#ifdef HAVE_GCONF 45#ifdef HAVE_GCONF
45static GConfClient *gconf_client; 46static GConfClient *gconf_client;
@@ -96,7 +97,7 @@ something_changedCB (client, cnxn_id, entry, user_data)
96 for (dpyinfo = x_display_list; !found && dpyinfo; dpyinfo = dpyinfo->next) 97 for (dpyinfo = x_display_list; !found && dpyinfo; dpyinfo = dpyinfo->next)
97 found = dpyinfo == first_dpyinfo; 98 found = dpyinfo == first_dpyinfo;
98 99
99 if (found) 100 if (found && use_system_font)
100 store_font_changed_event (Qfont_name, 101 store_font_changed_event (Qfont_name,
101 XCAR (first_dpyinfo->name_list_element)); 102 XCAR (first_dpyinfo->name_list_element));
102 } 103 }
@@ -610,7 +611,7 @@ DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font,
610 doc: /* Get the system default monospaced font. */) 611 doc: /* Get the system default monospaced font. */)
611 () 612 ()
612{ 613{
613 return current_mono_font 614 return current_mono_font && use_system_font
614 ? make_string (current_mono_font, strlen (current_mono_font)) 615 ? make_string (current_mono_font, strlen (current_mono_font))
615 : Qnil; 616 : Qnil;
616} 617}
@@ -630,6 +631,10 @@ syms_of_xsettings ()
630 staticpro (&Qfont_render); 631 staticpro (&Qfont_render);
631 defsubr (&Sfont_get_system_font); 632 defsubr (&Sfont_get_system_font);
632 633
634 DEFVAR_BOOL ("font-use-system-font", &use_system_font,
635 doc: /* *Non-nil means to use the system defined font. */);
636 use_system_font = 0;
637
633#ifdef HAVE_GCONF 638#ifdef HAVE_GCONF
634 Fprovide (intern_c_string ("system-font-setting"), Qnil); 639 Fprovide (intern_c_string ("system-font-setting"), Qnil);
635#endif 640#endif