From 811e9bacd8e24097bc65f1dfa79a5f6ac51071d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:30:22 -0800 Subject: * xselect.c (x_disown_buffer_selections): Remove; not used. --- src/xselect.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/xselect.c') diff --git a/src/xselect.c b/src/xselect.c index a502a74f904..9fedb7126e1 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2131,26 +2131,6 @@ Disowning it means there is no such selection. */) return Qt; } -/* Get rid of all the selections in buffer BUFFER. - This is used when we kill a buffer. */ - -void -x_disown_buffer_selections (Lisp_Object buffer) -{ - Lisp_Object tail; - struct buffer *buf = XBUFFER (buffer); - - for (tail = Vselection_alist; CONSP (tail); tail = XCDR (tail)) - { - Lisp_Object elt, value; - elt = XCAR (tail); - value = XCDR (elt); - if (CONSP (value) && MARKERP (XCAR (value)) - && XMARKER (XCAR (value))->buffer == buf) - Fx_disown_selection_internal (XCAR (elt), Qnil); - } -} - DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p, 0, 1, 0, doc: /* Whether the current Emacs process owns the given X Selection. -- cgit v1.2.1 From 7b83e2f1ffb02ad6965a47e249b35189f15b56cf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:31:57 -0800 Subject: * xselect.c (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. --- src/xselect.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/xselect.c') diff --git a/src/xselect.c b/src/xselect.c index 9fedb7126e1..27517f8252d 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -97,7 +97,6 @@ static Lisp_Object clean_local_selection_data (Lisp_Object); #define TRACE0(fmt) (void) 0 #define TRACE1(fmt, a0) (void) 0 #define TRACE2(fmt, a0, a1) (void) 0 -#define TRACE3(fmt, a0, a1) (void) 0 #endif -- cgit v1.2.1 From aa0daa9f93d94c229512e8cb0f0dc7c48c2b3e41 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:36:58 -0800 Subject: * xselect.c (x_own_selection, Fx_disown_selection_internal): Rename locals to avoid shadowing. (x_handle_dnd_message): Remove local to avoid shadowing. --- src/xselect.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/xselect.c') 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) struct frame *sf = SELECTED_FRAME (); Window selecting_window; Display *display; - Time time = last_event_timestamp; + Time timestamp = last_event_timestamp; Atom selection_atom; struct x_display_info *dpyinfo; @@ -345,7 +345,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) BLOCK_INPUT; x_catch_errors (display); - XSetSelectionOwner (display, selection_atom, selecting_window, time); + XSetSelectionOwner (display, selection_atom, selecting_window, timestamp); x_check_errors (display, "Can't set selection: %s"); x_uncatch_errors (); UNBLOCK_INPUT; @@ -356,7 +356,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) Lisp_Object selection_data; Lisp_Object prev_value; - selection_time = long_to_cons ((unsigned long) time); + selection_time = long_to_cons ((unsigned long) timestamp); selection_data = list4 (selection_name, selection_value, selection_time, selected_frame); prev_value = assq_no_quit (selection_name, Vselection_alist); @@ -2084,7 +2084,7 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal, Sx_disown_selection_internal, 1, 2, 0, doc: /* If we own the selection SELECTION, disown it. Disowning it means there is no such selection. */) - (Lisp_Object selection, Lisp_Object time) + (Lisp_Object selection, Lisp_Object time_object) { Time timestamp; Atom selection_atom; @@ -2103,10 +2103,10 @@ Disowning it means there is no such selection. */) display = FRAME_X_DISPLAY (sf); dpyinfo = FRAME_X_DISPLAY_INFO (sf); CHECK_SYMBOL (selection); - if (NILP (time)) + if (NILP (time_object)) timestamp = last_event_timestamp; else - timestamp = cons_to_long (time); + timestamp = cons_to_long (time_object); if (NILP (assq_no_quit (selection, Vselection_alist))) 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 if (event->format == 32 && event->format < BITS_PER_LONG) { - int i; for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */ idata[i] = (int) event->data.l[i]; data = (unsigned char *) idata; -- cgit v1.2.1