Mercurial > hg > xemacs-beta
diff src/select.c @ 829:42a86787d173
[xemacs-hg @ 2002-05-07 15:58:46 by stephent]
fix kill-ring bug <87elgoufss.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Tue, 07 May 2002 15:59:03 +0000 |
parents | 183866b06e0b |
children | f46864126a0d |
line wrap: on
line diff
--- a/src/select.c Tue May 07 15:30:18 2002 +0000 +++ b/src/select.c Tue May 07 15:59:03 2002 +0000 @@ -139,8 +139,8 @@ SELECTION-VALUE is typically a string, or a cons of two markers, but may be anything that the functions on selection-converter-out-alist know about. Optional arg HOW-TO-ADD specifies how the selection will be combined -with any existing selection(s) - see `own-selection' for more -information. +with any existing selection(s) - see `own-selection' and +`interprogram-cut-function' for more information. Optional arg DATA-TYPE is a window-system-specific type. Optional arg DEVICE specifies the device on which to assert the selection. It defaults to the selected device. @@ -509,8 +509,8 @@ } /* Request the selection value from the owner. If we are the owner, - simply return our selection value. If we are not the owner, this - will block until all of the data has arrived. + return Qnil. If we are not the owner, this will block until all of + the data has arrived. */ DEFUN ("get-selection-internal", Fget_selection_internal, 2, 3, 0, /* Return text selected from some window-system window. @@ -518,6 +518,8 @@ TARGET-TYPE is the type of data desired, typically STRING or COMPOUND_TEXT. Under Mule, if the resultant data comes back as 8-bit data in type TEXT or COMPOUND_TEXT, it will be decoded as Compound Text. +If XEmacs already owns the selection, return nil. See +`interprogram-paste-function' for more information. */ (selection, target_type, device)) { @@ -559,7 +561,8 @@ { /* If we get something from the local cache, we may need to convert it slightly - to do this, we call select-coerce */ - val = call3 (Qselect_coerce, selection, target_type, val); + Lisp_Object val2 = call3 (Qselect_coerce, selection, target_type, val); + return (EQ (val, val2)) ? Qnil : val2; } else if (HAS_DEVMETH_P (XDEVICE (device), get_foreign_selection)) {