# HG changeset patch # User stephent # Date 1021607215 0 # Node ID 74899b430f18eeadd6e1afd497dbda1f25b29e3a # Parent 7b263c3f9ec981fef787cd7e27251333b81161cd [xemacs-hg @ 2002-05-17 03:46:55 by stephent] complete the patch diff -r 7b263c3f9ec9 -r 74899b430f18 lisp/select.el --- a/lisp/select.el Thu May 16 15:24:21 2002 +0000 +++ b/lisp/select.el Fri May 17 03:46:55 2002 +0000 @@ -112,6 +112,15 @@ (signal (car err) (cdr err))))) (get-selection-internal type data-type))) +(defun get-selection-foreign (&optional type data-type) + "Return the value of a window-system selection, or nil if XEmacs owns it. +The argument TYPE (default `PRIMARY') says which selection, +and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule) +says how to convert the data. If there is no selection an error is signalled. +See `interprogram-paste-function' for more information." + (unless (selection-owner-p type) + (get-selection type data-type))) + ;; FSFmacs calls this `x-set-selection', and reverses the ;; first two arguments (duh ...). This order is more logical. (defun own-selection (data &optional type how-to-add data-type)