Function: xselect-convert-to-text-uri-list

xselect-convert-to-text-uri-list is a byte-compiled function defined in select.el.gz.

Signature

(xselect-convert-to-text-uri-list SELECTION TYPE VALUE)

Source Code

;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun xselect-convert-to-text-uri-list (selection _type value)
  ;; While `xselect-uri-list-available-p' ensures that this target
  ;; will not be reported in the TARGETS of non-drag-and-drop
  ;; selections, Firefox stupidly converts to it anyway.  Check that
  ;; the conversion request is being made for the correct selection.
  (and (eq selection 'XdndSelection)
       (let ((string
              (if (stringp value)
                  (xselect--encode-string 'TEXT
                                          (concat (url-encode-url value) "\n"))
                (when (vectorp value)
                  (with-temp-buffer
                    (cl-loop for tem across value
                             do (progn
                                  (insert (url-encode-url tem))
                                  (insert "\n")))
                    (xselect--encode-string 'TEXT (buffer-string)))))))
         (cons 'text/uri-list (cdr string)))))