diff src/xfns.c @ 25679:8b09c5927f1c

(QCfile): Moved to xdisp.c. (syms_of_xfns): Don't initialize QCfile. (check_x_frame): Change for Lisp_Object selected_frame. (check_x_display_info, x_get_resource_string): Ditto.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 13 Sep 1999 11:14:14 +0000
parents 9154af188477
children 815efc48a80b
line wrap: on
line diff
--- a/src/xfns.c	Mon Sep 13 11:14:08 1999 +0000
+++ b/src/xfns.c	Mon Sep 13 11:14:14 1999 +0000
@@ -294,12 +294,9 @@
   FRAME_PTR f;
 
   if (NILP (frame))
-    f = selected_frame;
-  else
-    {
-      CHECK_LIVE_FRAME (frame, 0);
-      f = XFRAME (frame);
-    }
+    frame = selected_frame;
+  CHECK_LIVE_FRAME (frame, 0);
+  f = XFRAME (frame);
   if (! FRAME_X_P (f))
     error ("Non-X frame used");
   return f;
@@ -315,9 +312,10 @@
 {
   if (NILP (frame))
     {
-      if (FRAME_X_P (selected_frame)
-	  && FRAME_LIVE_P (selected_frame))
-	return FRAME_X_DISPLAY_INFO (selected_frame);
+      struct frame *sf = XFRAME (selected_frame);
+      
+      if (FRAME_X_P (sf) && FRAME_LIVE_P (sf))
+	return FRAME_X_DISPLAY_INFO (sf);
       else if (x_display_list != 0)
 	return x_display_list;
       else
@@ -2583,6 +2581,7 @@
 {
   char *name_key;
   char *class_key;
+  struct frame *sf = SELECTED_FRAME ();
 
   /* Allocate space for the components, the dots which separate them,
      and the final '\0'.  */
@@ -2596,7 +2595,7 @@
 	   attribute);
   sprintf (class_key, "%s.%s", EMACS_CLASS, class);
 
-  return x_get_string_resource (FRAME_X_DISPLAY_INFO (selected_frame)->xrdb,
+  return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
 				name_key, class_key);
 }
 
@@ -5448,8 +5447,8 @@
 
 /* Keywords.  */
 
-Lisp_Object QCtype, QCdata, QCfile, QCascent, QCmargin, QCrelief;
-extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground;
+Lisp_Object QCtype, QCdata, QCascent, QCmargin, QCrelief;
+extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
 Lisp_Object QCalgorithm, QCcolor_symbols, QCheuristic_mask;
 Lisp_Object QCindex;
 
@@ -9956,7 +9955,7 @@
      Lisp_Object prompt, dir, default_filename, mustmatch;
 {
   int result;
-  struct frame *f = selected_frame;
+  struct frame *f = SELECTED_FRAME ();
   Lisp_Object file = Qnil;
   Widget dialog, text, list, help;
   Arg al[10];
@@ -10124,7 +10123,7 @@
   int id = -1;
   
   if (valid_image_p (spec))
-    id = lookup_image (selected_frame, spec);
+    id = lookup_image (SELECTED_FRAME (), spec);
 
   debug_print (spec);
   return make_number (id);
@@ -10403,8 +10402,6 @@
   staticpro (&Qxbm);
   QCtype = intern (":type");
   staticpro (&QCtype);
-  QCfile = intern (":file");
-  staticpro (&QCfile);
   QCalgorithm = intern (":algorithm");
   staticpro (&QCalgorithm);
   QCheuristic_mask = intern (":heuristic-mask");