diff options
| author | Jan Djärv | 2009-11-17 20:17:46 +0000 |
|---|---|---|
| committer | Jan Djärv | 2009-11-17 20:17:46 +0000 |
| commit | dfb3c4c6403a4199e2479ef9a06713b3cdc504d1 (patch) | |
| tree | 25ce5cc1a9fb929b243ccf7861ead2eec4e0d970 /src | |
| parent | 25fe851a7c3c37ba537e5c08af2b0396ccb5ad60 (diff) | |
| download | emacs-dfb3c4c6403a4199e2479ef9a06713b3cdc504d1.tar.gz emacs-dfb3c4c6403a4199e2479ef9a06713b3cdc504d1.zip | |
xsettings.c didn't check font-use-system-font, fix that.
* xsettings.c (something_changedCB, Ffont_get_system_font): Check
use_system_font.
(syms_of_xsettings): DEFVAR font-use-system-font.
* font-setting.el (font-use-system-font): Moved ...
* cus-start.el (all): ... to here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xsettings.c | 9 |
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 @@ | |||
| 1 | 2009-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 | |||
| 1 | 2009-11-17 Andreas Schwab <schwab@linux-m68k.org> | 7 | 2009-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/>. */ | |||
| 40 | static char *current_mono_font; | 40 | static char *current_mono_font; |
| 41 | static struct x_display_info *first_dpyinfo; | 41 | static struct x_display_info *first_dpyinfo; |
| 42 | static Lisp_Object Qfont_name, Qfont_render; | 42 | static Lisp_Object Qfont_name, Qfont_render; |
| 43 | static int use_system_font; | ||
| 43 | 44 | ||
| 44 | #ifdef HAVE_GCONF | 45 | #ifdef HAVE_GCONF |
| 45 | static GConfClient *gconf_client; | 46 | static 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 |