diff options
| author | Paul Eggert | 2011-03-09 17:58:37 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-09 17:58:37 -0800 |
| commit | 58d2d479084c072255e11fbb3f03afaaa3fcdfa2 (patch) | |
| tree | 99519125ac59cbd95659862a08b844ce759bb90f | |
| parent | a9a06e0b10b7583e73ffebd7111937516264c4d5 (diff) | |
| download | emacs-58d2d479084c072255e11fbb3f03afaaa3fcdfa2.tar.gz emacs-58d2d479084c072255e11fbb3f03afaaa3fcdfa2.zip | |
* 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.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xfns.c | 24 |
2 files changed, 16 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 094343b2d56..719984f5038 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -16,7 +16,10 @@ | |||
| 16 | * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, | 16 | * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, |
| 17 | so that the caller can use some name other than gcpro1. | 17 | so that the caller can use some name other than gcpro1. |
| 18 | (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. | 18 | (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. |
| 19 | * xfns.c (x_decode_color, x_set_name, x_window): Now static. | 19 | * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip): |
| 20 | (Fx_backspace_delete_keys_p): | ||
| 21 | Use them to avoid shadowing, and rename vars to avoid shadowing. | ||
| 22 | (x_decode_color, x_set_name, x_window): Now static. | ||
| 20 | (Fx_create_frame): Add braces to silence GCC warning. | 23 | (Fx_create_frame): Add braces to silence GCC warning. |
| 21 | (Fx_file_dialog, Fx_select_font): Fix pointer signedness. | 24 | (Fx_file_dialog, Fx_select_font): Fix pointer signedness. |
| 22 | (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame): | 25 | (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. */) | |||
| 3183 | to get the color reference counts right, so initialize them! */ | 3183 | to get the color reference counts right, so initialize them! */ |
| 3184 | { | 3184 | { |
| 3185 | Lisp_Object black; | 3185 | Lisp_Object black; |
| 3186 | struct gcpro gcpro1; | 3186 | struct gcpro inner_gcpro1; |
| 3187 | 3187 | ||
| 3188 | /* Function x_decode_color can signal an error. Make | 3188 | /* Function x_decode_color can signal an error. Make |
| 3189 | sure to initialize color slots so that we won't try | 3189 | 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. */) | |||
| 3196 | f->output_data.x->mouse_pixel = -1; | 3196 | f->output_data.x->mouse_pixel = -1; |
| 3197 | 3197 | ||
| 3198 | black = build_string ("black"); | 3198 | black = build_string ("black"); |
| 3199 | GCPRO1 (black); | 3199 | GCPRO1_VAR (black, inner_gcpro1); |
| 3200 | FRAME_FOREGROUND_PIXEL (f) | 3200 | FRAME_FOREGROUND_PIXEL (f) |
| 3201 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 3201 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 3202 | FRAME_BACKGROUND_PIXEL (f) | 3202 | FRAME_BACKGROUND_PIXEL (f) |
| @@ -3209,7 +3209,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3209 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 3209 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 3210 | f->output_data.x->mouse_pixel | 3210 | f->output_data.x->mouse_pixel |
| 3211 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 3211 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 3212 | UNGCPRO; | 3212 | UNGCPRO_VAR (inner_gcpro1); |
| 3213 | } | 3213 | } |
| 3214 | 3214 | ||
| 3215 | /* Specify the parent under which to make this X window. */ | 3215 | /* Specify the parent under which to make this X window. */ |
| @@ -4651,7 +4651,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 4651 | to get the color reference counts right, so initialize them! */ | 4651 | to get the color reference counts right, so initialize them! */ |
| 4652 | { | 4652 | { |
| 4653 | Lisp_Object black; | 4653 | Lisp_Object black; |
| 4654 | struct gcpro gcpro1; | 4654 | struct gcpro inner_gcpro1; |
| 4655 | 4655 | ||
| 4656 | /* Function x_decode_color can signal an error. Make | 4656 | /* Function x_decode_color can signal an error. Make |
| 4657 | sure to initialize color slots so that we won't try | 4657 | sure to initialize color slots so that we won't try |
| @@ -4664,7 +4664,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 4664 | f->output_data.x->mouse_pixel = -1; | 4664 | f->output_data.x->mouse_pixel = -1; |
| 4665 | 4665 | ||
| 4666 | black = build_string ("black"); | 4666 | black = build_string ("black"); |
| 4667 | GCPRO1 (black); | 4667 | GCPRO1_VAR (black, inner_gcpro1); |
| 4668 | FRAME_FOREGROUND_PIXEL (f) | 4668 | FRAME_FOREGROUND_PIXEL (f) |
| 4669 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 4669 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 4670 | FRAME_BACKGROUND_PIXEL (f) | 4670 | FRAME_BACKGROUND_PIXEL (f) |
| @@ -4677,7 +4677,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 4677 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 4677 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 4678 | f->output_data.x->mouse_pixel | 4678 | f->output_data.x->mouse_pixel |
| 4679 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 4679 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 4680 | UNGCPRO; | 4680 | UNGCPRO_VAR (inner_gcpro1); |
| 4681 | } | 4681 | } |
| 4682 | 4682 | ||
| 4683 | /* Set the name; the functions to which we pass f expect the name to | 4683 | /* 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. */) | |||
| 5035 | && !NILP (Fequal (last_string, string)) | 5035 | && !NILP (Fequal (last_string, string)) |
| 5036 | && !NILP (Fequal (last_parms, parms))) | 5036 | && !NILP (Fequal (last_parms, parms))) |
| 5037 | { | 5037 | { |
| 5038 | struct frame *f = XFRAME (tip_frame); | 5038 | struct frame *tip_f = XFRAME (tip_frame); |
| 5039 | 5039 | ||
| 5040 | /* Only DX and DY have changed. */ | 5040 | /* Only DX and DY have changed. */ |
| 5041 | if (!NILP (tip_timer)) | 5041 | if (!NILP (tip_timer)) |
| @@ -5046,9 +5046,9 @@ Text larger than the specified size is clipped. */) | |||
| 5046 | } | 5046 | } |
| 5047 | 5047 | ||
| 5048 | BLOCK_INPUT; | 5048 | BLOCK_INPUT; |
| 5049 | compute_tip_xy (f, parms, dx, dy, FRAME_PIXEL_WIDTH (f), | 5049 | compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f), |
| 5050 | FRAME_PIXEL_HEIGHT (f), &root_x, &root_y); | 5050 | FRAME_PIXEL_HEIGHT (tip_f), &root_x, &root_y); |
| 5051 | XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 5051 | XMoveWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f), |
| 5052 | root_x, root_y); | 5052 | root_x, root_y); |
| 5053 | UNBLOCK_INPUT; | 5053 | UNBLOCK_INPUT; |
| 5054 | goto start_timer; | 5054 | goto start_timer; |
| @@ -5694,7 +5694,7 @@ present and mapped to the usual X keysyms. */) | |||
| 5694 | struct frame *f = check_x_frame (frame); | 5694 | struct frame *f = check_x_frame (frame); |
| 5695 | Display *dpy = FRAME_X_DISPLAY (f); | 5695 | Display *dpy = FRAME_X_DISPLAY (f); |
| 5696 | Lisp_Object have_keys; | 5696 | Lisp_Object have_keys; |
| 5697 | int major, minor, op, event, error; | 5697 | int major, minor, op, event, error_code; |
| 5698 | 5698 | ||
| 5699 | BLOCK_INPUT; | 5699 | BLOCK_INPUT; |
| 5700 | 5700 | ||
| @@ -5710,7 +5710,7 @@ present and mapped to the usual X keysyms. */) | |||
| 5710 | /* Check that the server supports XKB. */ | 5710 | /* Check that the server supports XKB. */ |
| 5711 | major = XkbMajorVersion; | 5711 | major = XkbMajorVersion; |
| 5712 | minor = XkbMinorVersion; | 5712 | minor = XkbMinorVersion; |
| 5713 | if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor)) | 5713 | if (!XkbQueryExtension (dpy, &op, &event, &error_code, &major, &minor)) |
| 5714 | { | 5714 | { |
| 5715 | UNBLOCK_INPUT; | 5715 | UNBLOCK_INPUT; |
| 5716 | return Qlambda; | 5716 | return Qlambda; |