]> code.delx.au - gnu-emacs/commitdiff
Consistently use platform-specific function to detect window system.
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 5 Apr 2013 14:07:02 +0000 (18:07 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Fri, 5 Apr 2013 14:07:02 +0000 (18:07 +0400)
* 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.

20 files changed:
src/ChangeLog
src/font.c
src/fontset.c
src/fontset.h
src/frame.c
src/lisp.h
src/menu.c
src/msdos.c
src/nsfns.m
src/nsmenu.m
src/nsselect.m
src/nsterm.h
src/nsterm.m
src/w32fns.c
src/w32menu.c
src/w32term.h
src/xfaces.c
src/xfns.c
src/xmenu.c
src/xterm.h

index ea4e660ed8d367807f383062f49695ff99188e56..a11100e9aa82e67d87c281b9ff9935e50aa7c48e 100644 (file)
@@ -1,3 +1,22 @@
+2013-04-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       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.
+
 2013-04-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Prefer < to > in range checks such as 0 <= i && i < N.
index 0b0144f3197525c2438ca67115bb45d586d158f6..17573cdc264287bbee9e768b3912cbe93411acb2 100644 (file)
@@ -4844,7 +4844,7 @@ If the named font is not yet loaded, return nil.  */)
   Lisp_Object info;
   Lisp_Object font_object;
 
-  (*check_window_system_func) ();
+  check_window_system ();
 
   if (! FONTP (name))
     CHECK_STRING (name);
index 3578bc9403dd24a860c1a740635308ed6f0f5b4a..7aec26bbb5b4345cfd10c1dcc81bcc0e557d1fcb 100644 (file)
@@ -179,10 +179,6 @@ static int next_fontset_id;
    font for each character.  */
 static Lisp_Object Vdefault_fontset;
 
-/* Check if any window system is used now.  */
-void (*check_window_system_func) (void);
-
-
 /* Prototype declarations for static functions.  */
 static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object);
 
@@ -1213,7 +1209,7 @@ If REGEXPP is non-nil, PATTERN is a regular expression.  */)
   Lisp_Object fontset;
   int id;
 
-  (*check_window_system_func) ();
+  check_window_system ();
 
   CHECK_STRING (pattern);
 
@@ -1919,7 +1915,7 @@ format is the same as above.  */)
   Lisp_Object val, elt;
   int c, i, j, k;
 
-  (*check_window_system_func) ();
+  check_window_system ();
 
   fontset = check_fontset_name (fontset, &frame);
 
index 07ee5d65c251cda546a2a2ce76856a0fb00676c4..926520c80011d39d348d3662f28403754bfb8415 100644 (file)
@@ -26,9 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef EMACS_FONTSET_H
 #define EMACS_FONTSET_H
 
-/* Check if any window system is used now.  */
-extern void (*check_window_system_func) (void);
-
 struct face;
 
 extern void free_face_fontset (FRAME_PTR, struct face *);
index 0aeaf4cf417b754759d1de1b83a8079d458fd28c..5d5876ed0979527f05b510c7a9ae5ff653135c17 100644 (file)
@@ -3493,9 +3493,7 @@ and the class is `Emacs.CLASS.SUBCLASS'.  */)
   (Lisp_Object attribute, Lisp_Object class, Lisp_Object component,
    Lisp_Object subclass)
 {
-#ifdef HAVE_X_WINDOWS
-  check_x ();
-#endif
+  check_window_system ();
 
   return xrdb_get_resource (check_x_display_info (Qnil)->xrdb,
                            attribute, class, component, subclass);
index 82cf0cb2678c31325a484f75bb4e1a3d780acfb5..2e1d20a5109efbe8b90993e31747c928862c42df 100644 (file)
@@ -3765,6 +3765,11 @@ extern void syms_of_xterm (void);
 extern char *x_get_keysym_name (int);
 #endif /* HAVE_WINDOW_SYSTEM */
 
+#if defined(HAVE_WINDOW_SYSTEM) || defined (MSDOS)
+/* Defined in (x|w32)fns.c, nsfns.m, msdos.c.  */
+extern void check_window_system (void);
+#endif
+
 #ifdef HAVE_LIBXML2
 /* Defined in xml.c.  */
 extern void syms_of_xml (void);
@@ -3772,7 +3777,7 @@ extern void xml_cleanup_parser (void);
 #endif
 
 #ifdef HAVE_MENUS
-/* Defined in (x|w32)fns.c, nsfns.m...  */
+/* Defined in (x|w32)fns.c, nsfns.m, msdos.c.  */
 extern int have_menus_p (void);
 #endif
 
index ffb5c3bc9367168d3de89828aeddfdc03c909f77..ec9c681a3a9c94291203691c9d4e004f9fb3c755 100644 (file)
@@ -1085,7 +1085,8 @@ no quit occurs and `x-popup-menu' returns nil.  */)
 #ifdef HAVE_MENUS
   {
     bool get_current_pos_p = 0;
-    /* FIXME!!  check_w32 (); or check_x (); or check_ns (); */
+
+    check_window_system ();
 
     /* Decode the first argument: find the window and the coordinates.  */
     if (EQ (position, Qt)
index 695cca607287bded0f98ad304dab3fee7cf65a27..dc79b66e0b17113b75812547a3a709440ddbc61d 100644 (file)
@@ -1920,7 +1920,7 @@ dos_get_saved_screen (char **screen, int *rows, int *cols)
 
 /* We are not X, but we can emulate it well enough for our needs... */
 void
-check_x (void)
+check_window_system (void)
 {
   if (! FRAME_MSDOS_P (SELECTED_FRAME ()))
     error ("Not running under a window system");
index 17f27910ca25d46987f987f1c3bfac1bdeabeac4..f7cf898c7a9b3449a6bafb66d5cfd7da46315a59 100644 (file)
@@ -109,7 +109,7 @@ static ptrdiff_t image_cache_refcount;
 
 
 void
-check_ns (void)
+check_window_system (void)
 {
  if (NSApp == nil)
    error ("OpenStep is not in use or not initialized");
@@ -1145,7 +1145,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
   Lisp_Object tfont, tfontsize;
   static int desc_ctr = 1;
 
-  check_ns ();
+  check_window_system ();
 
   /* x_get_arg modifies parms.  */
   parms = Fcopy_alist (parms);
@@ -1442,7 +1442,7 @@ DEFUN ("ns-popup-font-panel", Fns_popup_font_panel, Sns_popup_font_panel,
   id fm;
   struct frame *f;
 
-  check_ns ();
+  check_window_system ();
   fm = [NSFontManager sharedFontManager];
   if (NILP (frame))
     f = SELECTED_FRAME ();
@@ -1466,7 +1466,7 @@ DEFUN ("ns-popup-color-panel", Fns_popup_color_panel, Sns_popup_color_panel,
 {
   struct frame *f;
 
-  check_ns ();
+  check_window_system ();
   if (NILP (frame))
     f = SELECTED_FRAME ();
   else
@@ -1503,7 +1503,7 @@ Optional arg DIR_ONLY_P, if non-nil, means choose only directories.  */)
   NSString *initS = NILP (init) || !STRINGP (init) ? nil :
     [NSString stringWithUTF8String: SSDATA (init)];
 
-  check_ns ();
+  check_window_system ();
 
   if (fileDelegate == nil)
     fileDelegate = [EmacsFileDelegate new];
@@ -1594,7 +1594,7 @@ If OWNER is nil, Emacs is assumed.  */)
 {
   const char *value;
 
-  check_ns ();
+  check_window_system ();
   if (NILP (owner))
     owner = build_string([ns_app_name UTF8String]);
   CHECK_STRING (name);
@@ -1614,7 +1614,7 @@ If OWNER is nil, Emacs is assumed.
 If VALUE is nil, the default is removed.  */)
      (Lisp_Object owner, Lisp_Object name, Lisp_Object value)
 {
-  check_ns ();
+  check_window_system ();
   if (NILP (owner))
     owner = build_string ([ns_app_name UTF8String]);
   CHECK_STRING (name);
@@ -1642,7 +1642,7 @@ DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
        doc: /* This function is a no-op.  It is only present for completeness.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   /* This function has no real equivalent under NeXTstep.  Return nil to
      indicate this. */
   return Qnil;
@@ -1692,7 +1692,7 @@ If omitted or nil, the selected frame's display is used.  */)
 {
   int num;
 
-  check_ns ();
+  check_window_system ();
   num = [[NSScreen screens] count];
 
   return (num != 0) ? make_number (num) : Qnil;
@@ -1706,7 +1706,7 @@ DISPLAY should be a frame, the display name as a string, or a terminal ID.
 If omitted or nil, the selected frame's display is used.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   return make_number ((int)
                      ([ns_get_screen (display) frame].size.height/(92.0/25.4)));
 }
@@ -1719,7 +1719,7 @@ DISPLAY should be a frame, the display name as a string, or a terminal ID.
 If omitted or nil, the selected frame's display is used.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   return make_number ((int)
                      ([ns_get_screen (display) frame].size.width/(92.0/25.4)));
 }
@@ -1733,7 +1733,7 @@ DISPLAY should be a frame, the display name as a string, or a terminal ID.
 If omitted or nil, the selected frame's display is used.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   switch ([ns_get_window (display) backingType])
     {
     case NSBackingStoreBuffered:
@@ -1759,7 +1759,7 @@ If omitted or nil, the selected frame's display is used.  */)
      (Lisp_Object display)
 {
   NSWindowDepth depth;
-  check_ns ();
+  check_window_system ();
   depth = [ns_get_screen (display) depth];
 
   if ( depth == NSBestDepth (NSCalibratedWhiteColorSpace, 2, 2, YES, NULL))
@@ -1786,7 +1786,7 @@ DISPLAY should be a frame, the display name as a string, or a terminal ID.
 If omitted or nil, the selected frame's display is used.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   switch ([ns_get_window (display) backingType])
     {
     case NSBackingStoreBuffered:
@@ -1839,7 +1839,7 @@ DEFUN ("x-close-connection", Fx_close_connection, Sx_close_connection,
 The argument DISPLAY is currently ignored.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   /*ns_delete_terminal (dpyinfo->terminal); */
   [NSApp terminate: NSApp];
   return Qnil;
@@ -1865,7 +1865,7 @@ DEFUN ("ns-hide-others", Fns_hide_others, Sns_hide_others,
        doc: /* Hides all applications other than Emacs.  */)
      (void)
 {
-  check_ns ();
+  check_window_system ();
   [NSApp hideOtherApplications: NSApp];
   return Qnil;
 }
@@ -1878,7 +1878,7 @@ If ON is equal to `activate', Emacs is unhidden and becomes
 the active application.  */)
      (Lisp_Object on)
 {
-  check_ns ();
+  check_window_system ();
   if (EQ (on, intern ("activate")))
     {
       [NSApp unhide: NSApp];
@@ -1897,7 +1897,7 @@ DEFUN ("ns-emacs-info-panel", Fns_emacs_info_panel, Sns_emacs_info_panel,
        doc: /* Shows the 'Info' or 'About' panel for Emacs.  */)
      (void)
 {
-  check_ns ();
+  check_window_system ();
   [NSApp orderFrontStandardAboutPanel: nil];
   return Qnil;
 }
@@ -1975,7 +1975,7 @@ DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0,
   NSMenu *svcs;
   id delegate;
 
-  check_ns ();
+  check_window_system ();
   svcs = [[NSMenu alloc] initWithTitle: @"Services"];
   [NSApp setServicesMenu: svcs];
   [NSApp registerServicesMenuSendTypes: ns_send_types
@@ -2028,7 +2028,7 @@ there was no result.  */)
   char *utfStr;
 
   CHECK_STRING (service);
-  check_ns ();
+  check_window_system ();
 
   utfStr = SSDATA (service);
   svcName = [NSString stringWithUTF8String: utfStr];
@@ -2152,7 +2152,7 @@ In case the execution fails, an error is signaled. */)
   NSEvent *nxev;
 
   CHECK_STRING (script);
-  check_ns ();
+  check_window_system ();
 
   block_input ();
 
@@ -2235,7 +2235,7 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
   /* remove appname prefix; TODO: allow for !="Emacs" */
   char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0);
   const char *res;
-  check_ns ();
+  check_window_system ();
 
   if (inhibit_x_resources)
     /* --quick was passed, so this is a no-op.  */
@@ -2305,7 +2305,7 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
      (Lisp_Object color, Lisp_Object frame)
 {
   NSColor * col;
-  check_ns ();
+  check_window_system ();
   return ns_lisp_to_color (color, &col) ? Qnil : Qt;
 }
 
@@ -2317,7 +2317,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
   NSColor * col;
   CGFloat red, green, blue, alpha;
 
-  check_ns ();
+  check_window_system ();
   CHECK_STRING (color);
 
   if (ns_lisp_to_color (color, &col))
@@ -2336,7 +2336,7 @@ DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
 {
   NSWindowDepth depth;
   NSString *colorSpace;
-  check_ns ();
+  check_window_system ();
   depth = [ns_get_screen (display) depth];
   colorSpace = NSColorSpaceFromDepth (depth);
 
@@ -2356,7 +2356,7 @@ If omitted or nil, that stands for the selected frame's display. */)
      (Lisp_Object display)
 {
   NSWindowDepth depth;
-  check_ns ();
+  check_window_system ();
   depth = [ns_get_screen (display) depth];
 
   return NSBitsPerPixelFromDepth (depth) > 1 ? Qt : Qnil;
@@ -2371,7 +2371,7 @@ DISPLAY should be either a frame, a display name (a string), or terminal ID.
 If omitted or nil, that stands for the selected frame's display.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   return make_number ((int) [ns_get_screen (display) frame].size.width);
 }
 
@@ -2384,7 +2384,7 @@ DISPLAY should be either a frame, a display name (a string), or terminal ID.
 If omitted or nil, that stands for the selected frame's display.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   return make_number ((int) [ns_get_screen (display) frame].size.height);
 }
 
@@ -2404,7 +2404,7 @@ that stands for the selected frame's display. */)
   NSScreen *screen;
   NSRect vScreen;
 
-  check_ns ();
+  check_window_system ();
   screen = ns_get_screen (display);
   if (!screen)
     return Qnil;
@@ -2428,7 +2428,7 @@ DISPLAY should be either a frame, a display name (a string), or terminal ID.
 If omitted or nil, that stands for the selected frame's display.  */)
      (Lisp_Object display)
 {
-  check_ns ();
+  check_window_system ();
   return make_number
     (NSBitsPerPixelFromDepth ([ns_get_screen (display) depth]));
 }
@@ -2443,7 +2443,7 @@ If omitted or nil, that stands for the selected frame's display.  */)
      (Lisp_Object display)
 {
   struct ns_display_info *dpyinfo;
-  check_ns ();
+  check_window_system ();
 
   dpyinfo = check_ns_display_info (display);
   /* We force 24+ bit depths to 24-bit to prevent an overflow.  */
@@ -2787,9 +2787,6 @@ be used as the image of the icon representing the frame.  */);
   defsubr (&Sx_show_tip);
   defsubr (&Sx_hide_tip);
 
-  /* used only in fontset.c */
-  check_window_system_func = check_ns;
-
   as_status = 0;
   as_script = Qnil;
   as_result = 0;
index 15878dc74d7267acf0480e2312001617be1e1159..d364639b0bc8f5d38c0e64b3548c2d256ccc29c3 100644 (file)
@@ -1409,7 +1409,7 @@ ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header)
 
   NSTRACE (x-popup-dialog);
 
-  check_ns ();
+  check_window_system ();
 
   isQ = NILP (header);
 
index 49380f879456b8a2025eb128324d140f5d3fb598..2f539a1640675a483e33befe9a725c6d0d893cd7 100644 (file)
@@ -355,7 +355,7 @@ On Nextstep, FRAME is unused.  */)
   Lisp_Object target_symbol, data;
 
 
-  check_ns ();
+  check_window_system ();
   CHECK_SYMBOL (selection);
   if (NILP (value))
       error ("selection value may not be nil.");
@@ -409,7 +409,7 @@ On MS-DOS, all this does is return non-nil if we own the selection.  */)
   (Lisp_Object selection, Lisp_Object time_object, Lisp_Object terminal)
 {
   id pb;
-  check_ns ();
+  check_window_system ();
   CHECK_SYMBOL (selection);
   if (NILP (assq_no_quit (selection, Vselection_alist))) return Qnil;
 
@@ -436,7 +436,7 @@ On Nextstep, TERMINAL is unused.  */)
   id pb;
   NSArray *types;
 
-  check_ns ();
+  check_window_system ();
   CHECK_SYMBOL (selection);
   if (EQ (selection, Qnil)) selection = QPRIMARY;
   if (EQ (selection, Qt)) selection = QSECONDARY;
@@ -464,7 +464,7 @@ frame's display, or the first available X display.
 On Nextstep, TERMINAL is unused.  */)
      (Lisp_Object selection, Lisp_Object terminal)
 {
-  check_ns ();
+  check_window_system ();
   CHECK_SYMBOL (selection);
   if (EQ (selection, Qnil)) selection = QPRIMARY;
   if (EQ (selection, Qt)) selection = QSECONDARY;
@@ -492,7 +492,7 @@ On Nextstep, TIME-STAMP and TERMINAL are unused.  */)
 {
   Lisp_Object val;
 
-  check_ns ();
+  check_window_system ();
   CHECK_SYMBOL (selection_name);
   CHECK_SYMBOL (target_type);
   val = ns_get_local_selection (selection_name, target_type);
@@ -516,7 +516,7 @@ SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
      (Lisp_Object selection)
 {
   id pb;
-  check_ns ();
+  check_window_system ();
   pb = ns_symbol_to_pb (selection);
   return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
 }
@@ -529,7 +529,7 @@ SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
      (Lisp_Object selection, Lisp_Object string)
 {
   id pb;
-  check_ns ();
+  check_window_system ();
   pb = ns_symbol_to_pb (selection);
   if (pb != nil) ns_string_to_pasteboard (pb, string);
   return Qnil;
index a43a90428d09f8c8047d13937658b867d0870ad6..59cac34773ad38ce46a8ad1c85692c219280394c 100644 (file)
@@ -764,7 +764,6 @@ extern void ns_clear_frame (struct frame *f);
 
 extern const char *ns_xlfd_to_fontname (const char *xlfd);
 
-extern void check_ns (void);
 extern Lisp_Object ns_map_event_to_object (void);
 #ifdef __OBJC__
 extern Lisp_Object ns_string_from_pasteboard (id pb);
index 9baa95a506b0b24b64391265369cc151d6fd9844..fb1b0aa327cb9e9e5638b82a8096209ba8e84261 100644 (file)
@@ -1013,7 +1013,7 @@ ns_raise_frame (struct frame *f)
    -------------------------------------------------------------------------- */
 {
   NSView *view = FRAME_NS_VIEW (f);
-  check_ns ();
+  check_window_system ();
   block_input ();
   if (FRAME_VISIBLE_P (f))
     [[view window] makeKeyAndOrderFront: NSApp];
@@ -1028,7 +1028,7 @@ ns_lower_frame (struct frame *f)
    -------------------------------------------------------------------------- */
 {
   NSView *view = FRAME_NS_VIEW (f);
-  check_ns ();
+  check_window_system ();
   block_input ();
   [[view window] orderBack: NSApp];
   unblock_input ();
@@ -1133,7 +1133,7 @@ x_make_frame_invisible (struct frame *f)
 {
   NSView * view = FRAME_NS_VIEW (f);
   NSTRACE (x_make_frame_invisible);
-  check_ns ();
+  check_window_system ();
   [[view window] orderOut: NSApp];
   SET_FRAME_VISIBLE (f, 0);
   SET_FRAME_ICONIFIED (f, 0);
@@ -1149,7 +1149,7 @@ x_iconify_frame (struct frame *f)
   NSView * view = FRAME_NS_VIEW (f);
   struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
   NSTRACE (x_iconify_frame);
-  check_ns ();
+  check_window_system ();
 
   if (dpyinfo->x_highlight_frame == f)
     dpyinfo->x_highlight_frame = 0;
@@ -1178,7 +1178,7 @@ x_free_frame_resources (struct frame *f)
   struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
   NSTRACE (x_free_frame_resources);
-  check_ns ();
+  check_window_system ();
 
   [(EmacsView *)view setWindowClosing: YES]; /* may not have been informed */
 
@@ -1219,7 +1219,7 @@ x_destroy_window (struct frame *f)
    -------------------------------------------------------------------------- */
 {
   NSTRACE (x_destroy_window);
-  check_ns ();
+  check_window_system ();
   x_free_frame_resources (f);
   ns_window_num--;
 }
index bd54e990efc54c42e04522a9b7b0f5f7b85d2ed1..2bc1042e12608114a0b5d676178b57a7948ddedb 100644 (file)
@@ -242,7 +242,7 @@ static unsigned int sound_type = 0xFFFFFFFF;
 \f
 /* Error if we are not connected to MS-Windows.  */
 void
-check_w32 (void)
+check_window_system (void)
 {
   if (! w32_in_use)
     error ("MS-Windows not in use or not initialized");
@@ -5358,7 +5358,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
   Lisp_Object buffer;
   struct buffer *old_buffer;
 
-  check_w32 ();
+  check_window_system ();
 
   /* Use this general default value to start with until we know if
      this frame has a specified name.  */
@@ -7635,8 +7635,6 @@ only be necessary if the default setting causes problems.  */);
   defsubr (&Sdefault_printer_name);
   defsubr (&Sset_message_beep);
 
-  check_window_system_func = check_w32;
-
   hourglass_hwnd = NULL;
 
   defsubr (&Sx_show_tip);
index 60ef6d2cfb5f64a0e1a5f015e4d98704c01efa29..0c8d5ca06c530b03fb65a0e6961ecfb91d190b60 100644 (file)
@@ -140,7 +140,7 @@ otherwise it is "Question". */)
   FRAME_PTR f = NULL;
   Lisp_Object window;
 
-  check_w32 ();
+  check_window_system ();
 
   /* Decode the first argument: find the window or frame to use.  */
   if (EQ (position, Qt)
index b319f0ca5924c1718943b5663294acacbb2dd1fb..e85ee7790d5096604c86dce23c2cb5158dc9a5eb 100644 (file)
@@ -203,7 +203,6 @@ extern void x_focus_on_frame (struct frame *f);
 
 extern struct w32_display_info *w32_term_init (Lisp_Object,
                                               char *, char *);
-extern void check_w32 (void);
 extern int w32_defined_color (FRAME_PTR f, const char *color,
                               XColor *color_def, int alloc);
 extern void x_set_window_size (struct frame *f, int change_grav,
index b988295e9b6aed053a558e0d8ad29b1f1fd536d2..9acaf6d6f5217d92641485550a4635050765ea99 100644 (file)
@@ -231,7 +231,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef FRAME_X_DISPLAY_INFO
 #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO
 #define x_display_info w32_display_info
-#define check_x check_w32
 #define GCGraphicsExposures 0
 #endif /* HAVE_NTGUI */
 
@@ -239,7 +238,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef FRAME_X_DISPLAY_INFO
 #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO
 #define x_display_info ns_display_info
-#define check_x check_ns
 #define GCGraphicsExposures 0
 #endif /* HAVE_NS */
 #endif /* HAVE_WINDOW_SYSTEM */
@@ -1636,7 +1634,7 @@ the WIDTH times as wide as FACE on FRAME.  */)
   struct frame *f;
   int size, avgwidth IF_LINT (= 0);
 
-  check_x ();
+  check_window_system ();
   CHECK_STRING (pattern);
 
   if (! NILP (maximum))
index b39b78004a4c82b9a05506ba7b8e766846e1530f..8b8d94d4779ba16c020aa1356dfd72e37d9b7458 100644 (file)
@@ -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;
index 2042699f48cb676a8cd6f9d836e252f99a3b3a20..e6291edf7d650f9b15fc8196a6f5bb30b2c55875 100644 (file)
@@ -223,7 +223,7 @@ for instance using the window manager, then this produces a quit and
   FRAME_PTR f = NULL;
   Lisp_Object window;
 
-  check_x ();
+  check_window_system ();
 
   /* Decode the first argument: find the window or frame to use.  */
   if (EQ (position, Qt)
index b241ff23559fe685a54f00e0eca1358ffb318167..6b64135927e4c515fd4e3a30988e106ea820489f 100644 (file)
@@ -366,10 +366,6 @@ struct x_display_info
 extern int use_xim;
 #endif
 
-/* This checks to make sure we have a display.  */
-
-extern void check_x (void);
-
 extern struct frame *x_window_to_frame (struct x_display_info *, int);
 extern struct frame *x_any_window_to_frame (struct x_display_info *, int);
 extern struct frame *x_menubar_window_to_frame (struct x_display_info *,