]> code.delx.au - gnu-emacs/blobdiff - src/xfns.c
Merge from emacs-24; up to 2014-07-27T09:41:59Z!ttn@gnu.org
[gnu-emacs] / src / xfns.c
index b19e5df5802feaf73e1a70b7d26e5d08de1ff8a0..5edb635b1827429e2b3cb985ac766b101d73bade 100644 (file)
@@ -159,7 +159,7 @@ check_x_display_info (Lisp_Object object)
     }
   else if (TERMINALP (object))
     {
-      struct terminal *t = get_terminal (object, 1);
+      struct terminal *t = decode_live_terminal (object);
 
       if (t->type != output_x_window)
         error ("Terminal %d is not an X display", t->id);
@@ -1140,10 +1140,8 @@ x_change_tool_bar_height (struct frame *f, int height)
 
   adjust_frame_size (f, -1, -1, 4, 0);
 
-/** #if !defined USE_X_TOOLKIT **/
   if (FRAME_X_WINDOW (f))
     x_clear_under_internal_border (f);
-/** #endif **/
 
 #endif /* USE_GTK */
 }
@@ -1561,7 +1559,6 @@ x_default_scroll_bar_color_parameter (struct frame *f,
                                      const char *xprop, const char *xclass,
                                      int foreground_p)
 {
-  USE_LOCAL_ALLOCA;
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   Lisp_Object tem;
 
@@ -1572,13 +1569,14 @@ x_default_scroll_bar_color_parameter (struct frame *f,
 
       /* See if an X resource for the scroll bar color has been
         specified.  */
-      tem = display_x_get_resource
-       (dpyinfo, build_local_string (foreground_p
-                                     ? "foreground"
-                                     : "background"),
-        empty_unibyte_string,
-        build_local_string ("verticalScrollBar"),
-        empty_unibyte_string);
+      AUTO_STRING (foreground, "foreground");
+      AUTO_STRING (background, "foreground");
+      AUTO_STRING (verticalScrollBar, "verticalScrollBar");
+      tem = (display_x_get_resource
+            (dpyinfo, foreground_p ? foreground : background,
+             empty_unibyte_string,
+             verticalScrollBar,
+             empty_unibyte_string));
       if (!STRINGP (tem))
        {
          /* If nothing has been specified, scroll bars will use a
@@ -1596,7 +1594,8 @@ x_default_scroll_bar_color_parameter (struct frame *f,
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
     }
 
-  x_set_frame_parameters (f, FRAME_PARAMETER (prop, tem));
+  AUTO_FRAME_ARG (arg, prop, tem);
+  x_set_frame_parameters (f, arg);
   return tem;
 }
 
@@ -2848,7 +2847,8 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms)
     {
       /* Remember the explicit font parameter, so we can re-apply it after
         we've applied the `default' face settings.  */
-      x_set_frame_parameters (f, FRAME_PARAMETER (Qfont_param, font_param));
+      AUTO_FRAME_ARG (arg, Qfont_param, font_param);
+      x_set_frame_parameters (f, arg);
     }
 
   /* This call will make X resources override any system font setting.  */
@@ -4273,14 +4273,14 @@ XScreenNumberOfScreen (scr)
 void
 select_visual (struct x_display_info *dpyinfo)
 {
-  USE_LOCAL_ALLOCA;
   Display *dpy = dpyinfo->display;
   Screen *screen = dpyinfo->screen;
 
   /* See if a visual is specified.  */
-  Lisp_Object value = display_x_get_resource
-    (dpyinfo, build_local_string ("visualClass"),
-     build_local_string ("VisualClass"), Qnil, Qnil);
+  AUTO_STRING (visualClass, "visualClass");
+  AUTO_STRING (VisualClass, "VisualClass");
+  Lisp_Object value = display_x_get_resource (dpyinfo, visualClass,
+                                             VisualClass, Qnil, Qnil);
 
   if (STRINGP (value))
     {
@@ -4829,7 +4829,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   f = make_frame (1);
   XSETFRAME (frame, f);
 
-  buffer = Fget_buffer_create (build_string (" *tip*"));
+  AUTO_STRING (tip, " *tip*");
+  buffer = Fget_buffer_create (tip);
   /* Use set_window_buffer instead of Fset_window_buffer (see
      discussion of bug#11984, bug#12025, bug#12026).  */
   set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
@@ -5039,7 +5040,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
 
   /* Add `tooltip' frame parameter's default value. */
   if (NILP (Fframe_parameter (frame, Qtooltip)))
-    Fmodify_frame_parameters (frame, FRAME_PARAMETER (Qtooltip, Qt));
+    {
+      AUTO_FRAME_ARG (arg, Qtooltip, Qt);
+      Fmodify_frame_parameters (frame, arg);
+    }
 
   /* FIXME - can this be done in a similar way to normal frames?
      http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */
@@ -5057,8 +5061,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
       disptype = intern ("color");
 
     if (NILP (Fframe_parameter (frame, Qdisplay_type)))
-      Fmodify_frame_parameters
-       (frame, FRAME_PARAMETER (Qdisplay_type, disptype));
+      {
+       AUTO_FRAME_ARG (arg, Qdisplay_type, disptype);
+       Fmodify_frame_parameters (frame, arg);
+      }
   }
 
   /* Set up faces after all frame parameters are known.  This call
@@ -5077,7 +5083,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
     call2 (Qface_set_after_frame_default, frame, Qnil);
 
     if (!EQ (bg, Fframe_parameter (frame, Qbackground_color)))
-      Fmodify_frame_parameters (frame, FRAME_PARAMETER (Qbackground_color, bg));
+      {
+       AUTO_FRAME_ARG (arg, Qbackground_color, bg);
+       Fmodify_frame_parameters (frame, arg);
+      }
   }
 
   f->no_split = 1;