Function: display-selections-p

display-selections-p is a byte-compiled function defined in frame.el.gz.

Signature

(display-selections-p &optional DISPLAY)

Documentation

Return non-nil if DISPLAY supports selections.

A selection is a way to transfer text or other data between programs via special system buffers called selection or clipboard. DISPLAY can be a display name, a frame, or nil (meaning the selected frame's display).

View in manual

Probably introduced at or before Emacs version 21.1.

Source Code

;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun display-selections-p (&optional display)
  "Return non-nil if DISPLAY supports selections.
A selection is a way to transfer text or other data between programs
via special system buffers called `selection' or `clipboard'.
DISPLAY can be a display name, a frame, or nil (meaning the selected
frame's display)."
  (let ((frame-type (framep-on-display display)))
    (cond
     ((eq frame-type 'pc)
      ;; MS-DOS frames support selections when Emacs runs inside
      ;; a Windows DOS Box.
      (with-no-warnings
       (not (null dos-windows-version))))
     ((memq frame-type '(x w32 ns pgtk))
      t)
     ((and tty-select-active-regions
           (terminal-parameter nil 'xterm--set-selection))
      t)
     (t
      nil))))