CHECK_SYMBOL (target_type);
handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
- /* gcpro is not needed here since nothing but HANDLER_FN
- is live, and that ought to be a symbol. */
if (!NILP (handler_fn))
value = call3 (handler_fn,
static void
x_handle_selection_request (struct selection_input_event *event)
{
- struct gcpro gcpro1, gcpro2;
Time local_selection_time;
struct x_display_info *dpyinfo = SELECTION_EVENT_DPYINFO (event);
Lisp_Object local_selection_data;
bool success = false;
ptrdiff_t count = SPECPDL_INDEX ();
- GCPRO2 (local_selection_data, target_symbol);
if (!dpyinfo) goto DONE;
selection_symbol, target_symbol, success ? Qt : Qnil);
unbind_to (count, Qnil);
- UNGCPRO;
}
/* Perform the requested selection conversion, and write the data to
Lisp_Object target_symbol, Atom property,
bool for_multiple, struct x_display_info *dpyinfo)
{
- struct gcpro gcpro1;
Lisp_Object lisp_selection;
struct selection_data *cs;
- GCPRO1 (lisp_selection);
lisp_selection
= x_get_local_selection (selection_symbol, target_symbol,
converted_selections = cs;
}
- UNGCPRO;
return false;
}
cs->next = converted_selections;
converted_selections = cs;
lisp_data_to_selection_data (dpyinfo, lisp_selection, cs);
- UNGCPRO;
return true;
}
\f
Lisp_Object time_stamp, Lisp_Object terminal)
{
Lisp_Object val = Qnil;
- struct gcpro gcpro1, gcpro2;
struct frame *f = frame_for_x_selection (terminal);
- GCPRO2 (target_type, val); /* we store newly consed data into these */
CHECK_SYMBOL (selection_symbol);
CHECK_SYMBOL (target_type);
{
Lisp_Object frame;
XSETFRAME (frame, f);
- RETURN_UNGCPRO (x_get_foreign_selection (selection_symbol, target_type,
- time_stamp, frame));
+ return x_get_foreign_selection (selection_symbol, target_type,
+ time_stamp, frame);
}
if (CONSP (val) && SYMBOLP (XCAR (val)))
if (CONSP (val) && NILP (XCDR (val)))
val = XCAR (val);
}
- RETURN_UNGCPRO (clean_local_selection_data (val));
+ return clean_local_selection_data (val);
}
DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,