}
if (x_window_to_frame (dpyinfo, window)) /* #### debug */
- error ("attempt to transfer an INCR to ourself!");
+ error ("Attempt to transfer an INCR to ourself!");
#if 0
fprintf (stderr, "\nINCR %d\n", bytes_remaining);
#endif
wait_reading_process_input (secs, usecs, property_change_reply, 0);
if (NILP (XCONS (property_change_reply)->car))
- error ("timed out waiting for property-notify event");
+ error ("Timed out waiting for property-notify event");
}
unbind_to (count, Qnil);
UNBLOCK_INPUT;
if (NILP (XCONS (reading_selection_reply)->car))
- error ("timed out waiting for reply from selection owner");
+ error ("Timed out waiting for reply from selection owner");
+ if (EQ (XCONS (reading_selection_reply)->car, Qlambda))
+ error ("No `%s' selection", XSYMBOL (selection_symbol)->name->data);
/* Otherwise, the selection is waiting for us on the requested property. */
return
}
\f
/* Called from XTread_socket to handle SelectionNotify events.
- If it's the selection we are waiting for, stop waiting. */
+ If it's the selection we are waiting for, stop waiting
+ by setting the car of reading_selection_reply to non-nil.
+ We store t there if the reply is successful, lambda if not. */
void
x_handle_selection_notify (event)
if (event->selection != reading_which_selection)
return;
- XCONS (reading_selection_reply)->car = Qt;
+ XCONS (reading_selection_reply)->car
+ = (event->property != 0 ? Qt : Qlambda);
}
\f
{
check_x ();
CHECK_SYMBOL (selection_name, 0);
- if (NILP (selection_value)) error ("selection-value may not be nil.");
+ if (NILP (selection_value)) error ("selection-value may not be nil");
x_own_selection (selection_name, selection_value);
return selection_value;
}