Commit 58d2d479 authored by Paul Eggert's avatar Paul Eggert
Browse files

* 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.
parent a9a06e0b
......@@ -16,7 +16,10 @@
* 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):
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment