summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-04-05 18:07:02 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-04-05 18:07:02 +0400
commit73931ad14ad7a51d91f10b19ae9ca8cadb256916 (patch)
tree43ac5997fa67fa4824162b85b84104b1056ab5ce /src/xfns.c
parent632556e4feb1121faff0c6fd31ee84f7e13591ec (diff)
Consistently use platform-specific function to detect window system.
* lisp.h (check_window_system): New prototype. This function is going to replace check_x, check_w32 and check_ns. (have_menus_p): Mention msdos.c in comment. * fontset.c (check_window_system_func): Remove. Adjust all users. * fontset.h (check_window_system_func): Remove prototype. * nsterm.h (check_ns): * xterm.h (check_x): * w32term.h (check_w32): Likewise. * menu.c (Fx_popup_menu): Use check_window_system. * msdos.c (check_window_system): Define for MS-DOS. * nsfns.m (check_window_system): Define for NS. Adjust all users. * w32fns.c (check_window_system): Likewise for MS-Windows. * xfns.c (check_window_system): Likewise for X. * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c: * xfaces.c, xmenu.c: Use check_window_system where appropriate.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/xfns.c b/src/xfns.c
index b39b78004a..8b8d94d477 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -143,7 +143,7 @@ static struct x_display_info *x_display_info_for_name (Lisp_Object);
/* Error if we are not connected to X. */
void
-check_x (void)
+check_window_system (void)
{
if (! x_in_use)
error ("X windows are not in use or not initialized");
@@ -4525,7 +4525,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
Lisp_Object buffer;
struct buffer *old_buffer;
- check_x ();
+ check_window_system ();
if (!dpyinfo->terminal->name)
error ("Terminal is not live, can't create new frames on it");
@@ -5316,7 +5316,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
ptrdiff_t count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
- check_x ();
+ check_window_system ();
GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
@@ -5486,7 +5486,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
char *cdef_file;
- check_x ();
+ check_window_system ();
GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
@@ -5548,7 +5548,7 @@ nil, it defaults to the selected frame. */)
struct gcpro gcpro1, gcpro2;
ptrdiff_t count = SPECPDL_INDEX ();
- check_x ();
+ check_window_system ();
if (popup_activated ())
error ("Trying to use a menu from within a menu-entry");
@@ -5919,9 +5919,6 @@ When using Gtk+ tooltips, the tooltip face is not used. */);
defsubr (&Sx_focus_frame);
defsubr (&Sx_backspace_delete_keys_p);
- /* Setting callback functions for fontset handler. */
- check_window_system_func = check_x;
-
defsubr (&Sx_show_tip);
defsubr (&Sx_hide_tip);
tip_timer = Qnil;