{
Lisp_Object local_value;
Lisp_Object handler_fn, value, check;
- ptrdiff_t count;
local_value = assq_no_quit (selection_name, Vselection_alist);
if (NILP (local_value)) return Qnil;
- count = specpdl_ptr - specpdl;
+ dynwind_begin ();
specbind (Qinhibit_quit, Qt);
CHECK_SYMBOL (target_type);
handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
XCAR (XCDR (local_value)));
else
value = Qnil;
- unbind_to (count, Qnil);
+ dynwind_end ();
check = value;
if (CONSP (value) && SYMBOLP (XCAR (value)))
id pb;
NSArray *types;
- check_window_system (NULL);
+ if (!window_system_available (NULL))
+ return Qnil;
+
CHECK_SYMBOL (selection);
if (EQ (selection, Qnil)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
void
syms_of_nsselect (void)
{
+#include "nsselect.x"
+
QCLIPBOARD = intern_c_string ("CLIPBOARD"); staticpro (&QCLIPBOARD);
QSECONDARY = intern_c_string ("SECONDARY"); staticpro (&QSECONDARY);
QTEXT = intern_c_string ("TEXT"); staticpro (&QTEXT);
QFILE_NAME = intern_c_string ("FILE_NAME"); staticpro (&QFILE_NAME);
- defsubr (&Sx_disown_selection_internal);
- defsubr (&Sx_get_selection_internal);
- defsubr (&Sx_own_selection_internal);
- defsubr (&Sx_selection_exists_p);
- defsubr (&Sx_selection_owner_p);
- defsubr (&Sns_get_selection_internal);
- defsubr (&Sns_store_selection_internal);
-
Vselection_alist = Qnil;
staticpro (&Vselection_alist);