Function: xselect-convert-to-targets
xselect-convert-to-targets is a byte-compiled function defined in
select.el.gz.
Signature
(xselect-convert-to-targets SELECTION TYPE VALUE)
Source Code
;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun xselect-convert-to-targets (selection _type value)
;; Return a vector of atoms, but remove duplicates first.
(if (eq selection 'XdndSelection)
;; This isn't required by the XDND protocol, and sure enough no
;; clients seem to dependent on it, but Emacs implements the
;; receiver side of the Motif drop protocol by looking at the
;; initiator selection's TARGETS target (which Motif provides)
;; instead of the target table on the drag window, so it seems
;; plausible for other clients to rely on that as well.
(apply #'vector (mapcar #'intern x-dnd-targets-list))
(apply #'vector
(delete-dups
`( TIMESTAMP MULTIPLE
. ,(delq '_EMACS_INTERNAL
(mapcar (lambda (conv)
(if (or (not (consp (cdr conv)))
(funcall (cadr conv) selection
(car conv) value))
(car conv)
'_EMACS_INTERNAL))
selection-converter-alist)))))))