]> git.eshelyaron.com Git - emacs.git/commitdiff
* xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Mar 2011 01:58:37 +0000 (17:58 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Mar 2011 01:58:37 +0000 (17:58 -0800)
(Fx_backspace_delete_keys_p):
Use them to avoid shadowing, and rename vars to avoid shadowing.
(x_decode_color, x_set_name, x_window): Now static.

src/ChangeLog
src/xfns.c

index 094343b2d563024960f5b5ac626a8d5fcd685b53..719984f503859e459b0b24816259793d4f0ab15b 100644 (file)
        * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
        so that the caller can use some name other than gcpro1.
        (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
-       * xfns.c (x_decode_color, x_set_name, x_window): Now static.
+       * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
+       (Fx_backspace_delete_keys_p):
+       Use them to avoid shadowing, and rename vars to avoid shadowing.
+       (x_decode_color, x_set_name, x_window): Now static.
        (Fx_create_frame): Add braces to silence GCC warning.
        (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
        (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
index 21453a8958adf9e566e28a7635e56ade3646b374..3f0bd2a7d6a18fd4b6047dff5d381cb5de461a4a 100644 (file)
@@ -3183,7 +3183,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
      to get the color reference counts right, so initialize them!  */
   {
     Lisp_Object black;
-    struct gcpro gcpro1;
+    struct gcpro inner_gcpro1;
 
     /* Function x_decode_color can signal an error.  Make
        sure to initialize color slots so that we won't try
@@ -3196,7 +3196,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
     f->output_data.x->mouse_pixel = -1;
 
     black = build_string ("black");
-    GCPRO1 (black);
+    GCPRO1_VAR (black, inner_gcpro1);
     FRAME_FOREGROUND_PIXEL (f)
       = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
     FRAME_BACKGROUND_PIXEL (f)
@@ -3209,7 +3209,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
       = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
     f->output_data.x->mouse_pixel
       = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
-    UNGCPRO;
+    UNGCPRO_VAR (inner_gcpro1);
   }
 
   /* Specify the parent under which to make this X window.  */
@@ -4651,7 +4651,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
      to get the color reference counts right, so initialize them!  */
   {
     Lisp_Object black;
-    struct gcpro gcpro1;
+    struct gcpro inner_gcpro1;
 
     /* Function x_decode_color can signal an error.  Make
        sure to initialize color slots so that we won't try
@@ -4664,7 +4664,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
     f->output_data.x->mouse_pixel = -1;
 
     black = build_string ("black");
-    GCPRO1 (black);
+    GCPRO1_VAR (black, inner_gcpro1);
     FRAME_FOREGROUND_PIXEL (f)
       = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
     FRAME_BACKGROUND_PIXEL (f)
@@ -4677,7 +4677,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
       = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
     f->output_data.x->mouse_pixel
       = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
-    UNGCPRO;
+    UNGCPRO_VAR (inner_gcpro1);
   }
 
   /* Set the name; the functions to which we pass f expect the name to
@@ -5035,7 +5035,7 @@ Text larger than the specified size is clipped.  */)
          && !NILP (Fequal (last_string, string))
          && !NILP (Fequal (last_parms, parms)))
        {
-         struct frame *f = XFRAME (tip_frame);
+         struct frame *tip_f = XFRAME (tip_frame);
 
          /* Only DX and DY have changed.  */
          if (!NILP (tip_timer))
@@ -5046,9 +5046,9 @@ Text larger than the specified size is clipped.  */)
            }
 
          BLOCK_INPUT;
-         compute_tip_xy (f, parms, dx, dy, FRAME_PIXEL_WIDTH (f),
-                         FRAME_PIXEL_HEIGHT (f), &root_x, &root_y);
-         XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+         compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f),
+                         FRAME_PIXEL_HEIGHT (tip_f), &root_x, &root_y);
+         XMoveWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f),
                       root_x, root_y);
          UNBLOCK_INPUT;
          goto start_timer;
@@ -5694,7 +5694,7 @@ present and mapped to the usual X keysyms.  */)
   struct frame *f = check_x_frame (frame);
   Display *dpy = FRAME_X_DISPLAY (f);
   Lisp_Object have_keys;
-  int major, minor, op, event, error;
+  int major, minor, op, event, error_code;
 
   BLOCK_INPUT;
 
@@ -5710,7 +5710,7 @@ present and mapped to the usual X keysyms.  */)
   /* Check that the server supports XKB.  */
   major = XkbMajorVersion;
   minor = XkbMinorVersion;
-  if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor))
+  if (!XkbQueryExtension (dpy, &op, &event, &error_code, &major, &minor))
     {
       UNBLOCK_INPUT;
       return Qlambda;