Function: lost-selection-post-select-region-function

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

Signature

(lost-selection-post-select-region-function TEXT)

Documentation

Handle the region being selected into PRIMARY.

If the current buffer is different from the last buffer, deactivate the mark in every other buffer. TEXT is ignored.

Source Code

;; Defined in /usr/src/emacs/lisp/select.el.gz
(defun lost-selection-post-select-region-function (_text)
  "Handle the region being selected into PRIMARY.
If the current buffer is different from the last buffer,
deactivate the mark in every other buffer.
TEXT is ignored."
  (when (not (eq lost-selection-last-region-buffer
                 (current-buffer)))
    (dolist (buffer (buffer-list))
      (unless (or (string-match-p "^ "
                                  (buffer-name buffer))
                  (eq buffer (current-buffer)))
        (with-current-buffer buffer
          (deactivate-mark t))))
    (setq lost-selection-last-region-buffer (current-buffer))))