From: Paul Eggert Date: Thu, 10 Mar 2011 01:58:37 +0000 (-0800) Subject: * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip): X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~605^2^2~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=58d2d479084c072255e11fbb3f03afaaa3fcdfa2;p=emacs.git * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 094343b2d56..719984f5038 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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): diff --git a/src/xfns.c b/src/xfns.c index 21453a8958a..3f0bd2a7d6a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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;