Function: gui-get-primary-selection
gui-get-primary-selection is a byte-compiled function defined in
select.el.gz.
Signature
(gui-get-primary-selection)
Documentation
Return the PRIMARY selection, or the best emulation thereof.
Probably introduced at or before Emacs version 25.1.
Aliases
x-get-selection-value (obsolete since 25.1)
Source Code
;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun gui-get-primary-selection ()
"Return the PRIMARY selection, or the best emulation thereof."
(or (gui--selection-value-internal 'PRIMARY)
(and (fboundp 'w32-get-selection-value)
(eq (framep (selected-frame)) 'w32)
;; MS-Windows emulates PRIMARY in x-get-selection, but only
;; within the Emacs session, so consult the clipboard if
;; primary is not found.
(w32-get-selection-value))
(error "No selection is available")))