Function: lost-selection-function

lost-selection-function is a byte-compiled function defined in select.el.gz.

Signature

(lost-selection-function SELECTION)

Documentation

Handle losing of ownership of SELECTION.

If SELECTION is PRIMARY, deactivate the mark in every non-temporary buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun lost-selection-function (selection)
  "Handle losing of ownership of SELECTION.
If SELECTION is `PRIMARY', deactivate the mark in every
non-temporary buffer."
  (let ((select-active-regions nil))
    (when (eq selection 'PRIMARY)
      (dolist (buffer (buffer-list))
        (unless (string-match-p "^ "
                                (buffer-name buffer))
          (with-current-buffer buffer
            (deactivate-mark t)))))))