aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-03-09 17:36:58 -0800
committerPaul Eggert2011-03-09 17:36:58 -0800
commitaa0daa9f93d94c229512e8cb0f0dc7c48c2b3e41 (patch)
treeeb4526f61c8cd96aa2128c836bf09ed3ce06a3e9
parent7b83e2f1ffb02ad6965a47e249b35189f15b56cf (diff)
downloademacs-aa0daa9f93d94c229512e8cb0f0dc7c48c2b3e41.tar.gz
emacs-aa0daa9f93d94c229512e8cb0f0dc7c48c2b3e41.zip
* xselect.c (x_own_selection, Fx_disown_selection_internal): Rename locals
to avoid shadowing. (x_handle_dnd_message): Remove local to avoid shadowing.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xselect.c13
2 files changed, 9 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b25fcc36799..40c502a7970 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,9 @@
2 2
3 * xselect.c (x_disown_buffer_selections): Remove; not used. 3 * xselect.c (x_disown_buffer_selections): Remove; not used.
4 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. 4 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
5 (x_own_selection, Fx_disown_selection_internal): Rename locals
6 to avoid shadowing.
7 (x_handle_dnd_message): Remove local to avoid shadowing.
5 8
6 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, 9 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
7 so that the caller can use some name other than gcpro1. 10 so that the caller can use some name other than gcpro1.
diff --git a/src/xselect.c b/src/xselect.c
index 27517f8252d..5254fa96838 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -329,7 +329,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
329 struct frame *sf = SELECTED_FRAME (); 329 struct frame *sf = SELECTED_FRAME ();
330 Window selecting_window; 330 Window selecting_window;
331 Display *display; 331 Display *display;
332 Time time = last_event_timestamp; 332 Time timestamp = last_event_timestamp;
333 Atom selection_atom; 333 Atom selection_atom;
334 struct x_display_info *dpyinfo; 334 struct x_display_info *dpyinfo;
335 335
@@ -345,7 +345,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
345 345
346 BLOCK_INPUT; 346 BLOCK_INPUT;
347 x_catch_errors (display); 347 x_catch_errors (display);
348 XSetSelectionOwner (display, selection_atom, selecting_window, time); 348 XSetSelectionOwner (display, selection_atom, selecting_window, timestamp);
349 x_check_errors (display, "Can't set selection: %s"); 349 x_check_errors (display, "Can't set selection: %s");
350 x_uncatch_errors (); 350 x_uncatch_errors ();
351 UNBLOCK_INPUT; 351 UNBLOCK_INPUT;
@@ -356,7 +356,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
356 Lisp_Object selection_data; 356 Lisp_Object selection_data;
357 Lisp_Object prev_value; 357 Lisp_Object prev_value;
358 358
359 selection_time = long_to_cons ((unsigned long) time); 359 selection_time = long_to_cons ((unsigned long) timestamp);
360 selection_data = list4 (selection_name, selection_value, 360 selection_data = list4 (selection_name, selection_value,
361 selection_time, selected_frame); 361 selection_time, selected_frame);
362 prev_value = assq_no_quit (selection_name, Vselection_alist); 362 prev_value = assq_no_quit (selection_name, Vselection_alist);
@@ -2084,7 +2084,7 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
2084 Sx_disown_selection_internal, 1, 2, 0, 2084 Sx_disown_selection_internal, 1, 2, 0,
2085 doc: /* If we own the selection SELECTION, disown it. 2085 doc: /* If we own the selection SELECTION, disown it.
2086Disowning it means there is no such selection. */) 2086Disowning it means there is no such selection. */)
2087 (Lisp_Object selection, Lisp_Object time) 2087 (Lisp_Object selection, Lisp_Object time_object)
2088{ 2088{
2089 Time timestamp; 2089 Time timestamp;
2090 Atom selection_atom; 2090 Atom selection_atom;
@@ -2103,10 +2103,10 @@ Disowning it means there is no such selection. */)
2103 display = FRAME_X_DISPLAY (sf); 2103 display = FRAME_X_DISPLAY (sf);
2104 dpyinfo = FRAME_X_DISPLAY_INFO (sf); 2104 dpyinfo = FRAME_X_DISPLAY_INFO (sf);
2105 CHECK_SYMBOL (selection); 2105 CHECK_SYMBOL (selection);
2106 if (NILP (time)) 2106 if (NILP (time_object))
2107 timestamp = last_event_timestamp; 2107 timestamp = last_event_timestamp;
2108 else 2108 else
2109 timestamp = cons_to_long (time); 2109 timestamp = cons_to_long (time_object);
2110 2110
2111 if (NILP (assq_no_quit (selection, Vselection_alist))) 2111 if (NILP (assq_no_quit (selection, Vselection_alist)))
2112 return Qnil; /* Don't disown the selection when we're not the owner. */ 2112 return Qnil; /* Don't disown the selection when we're not the owner. */
@@ -2434,7 +2434,6 @@ x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_disp
2434 2434
2435 if (event->format == 32 && event->format < BITS_PER_LONG) 2435 if (event->format == 32 && event->format < BITS_PER_LONG)
2436 { 2436 {
2437 int i;
2438 for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */ 2437 for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */
2439 idata[i] = (int) event->data.l[i]; 2438 idata[i] = (int) event->data.l[i];
2440 data = (unsigned char *) idata; 2439 data = (unsigned char *) idata;