Function: xselect-convert-to-string

xselect-convert-to-string is a byte-compiled function defined in select.el.gz.

Signature

(xselect-convert-to-string SELECTION TYPE VALUE)

Source Code

;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun xselect-convert-to-string (_selection type value)
  (let ((str (cond ((stringp value) value)
		   ((setq value (xselect--selection-bounds value))
		    (with-current-buffer (nth 2 value)
                      (when (and (>= (nth 0 value) (point-min))
                                 (<= (nth 1 value) (point-max)))
                        (buffer-substring (nth 0 value)
                                          (nth 1 value))))))))
    (when str
      (xselect--encode-string type str t))))