* 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):
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
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)
= 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. */
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
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)
= 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
&& !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))
}
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;
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;
/* 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;