Function: secondary-selection-from-region

secondary-selection-from-region is a byte-compiled function defined in mouse.el.gz.

Signature

(secondary-selection-from-region)

Documentation

Set beginning and end of the secondary selection to those of the region.

When there is no region, this function does nothing.

Probably introduced at or before Emacs version 26.1.

Source Code

;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defun secondary-selection-from-region ()
  "Set beginning and end of the secondary selection to those of the region.
When there is no region, this function does nothing."
  (when (region-active-p) ; Create the secondary selection from the region.
    (delete-overlay mouse-secondary-overlay) ; Delete the secondary selection even on a different buffer.
    (move-overlay mouse-secondary-overlay (region-beginning) (region-end))))