Mercurial > hg > xemacs-beta
diff src/select.c @ 458:c33ae14dd6d0 r21-2-44
Import from CVS: tag r21-2-44
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:42:25 +0200 |
parents | e7ef97881643 |
children | 183866b06e0b |
line wrap: on
line diff
--- a/src/select.c Mon Aug 13 11:41:26 2007 +0200 +++ b/src/select.c Mon Aug 13 11:42:25 2007 +0200 @@ -151,6 +151,7 @@ value_list = Qnil; Lisp_Object prev_real_value = Qnil; struct gcpro gcpro1; + int owned_p = 0; CHECK_SYMBOL (selection_name); if (NILP (selection_value)) error ("selection-value may not be nil."); @@ -180,6 +181,7 @@ if (!NILP (local_selection_data)) { + owned_p = 1; /* Don't use Fdelq() as that may QUIT;. */ if (EQ (local_selection_data, Fcar (Vselection_alist))) Vselection_alist = Fcdr (Vselection_alist); @@ -201,7 +203,10 @@ prev_value = assq_no_quit (selection_name, Vselection_alist); if (!NILP (prev_value)) - value_list = XCAR (XCDR (prev_value)); + { + owned_p = 1; + value_list = XCAR (XCDR (prev_value)); + } if (!NILP (value_list)) prev_real_value = assq_no_quit (data_type, value_list); @@ -280,7 +285,7 @@ if (HAS_DEVMETH_P (XDEVICE (device), own_selection)) selection_time = DEVMETH (XDEVICE (device), own_selection, (selection_name, selection_value, - how_to_add, data_type, !NILP (prev_value))); + how_to_add, data_type, owned_p)); else selection_time = Qnil;