Variable: mouse-drag-copy-region

mouse-drag-copy-region is a customizable variable defined in mouse.el.gz.

Value

nil

Documentation

If non-nil, copy to kill ring upon mouse adjustments of the region.

This affects mouse-save-then-kill (<mouse-3> (mouse-save-then-kill)) in addition to mouse drags.

If this variable is non-empty, only copy to the kill ring if the region is non-empty. For instance, if you mouse drag an area that is less than a half a character, you'd normally get the empty string in your kill ring, but with this value, this short mouse drag won't affect the kill ring.

This variable applies only to mouse adjustments in Emacs, not selecting and adjusting regions in other windows.

This variable was added, or its default value changed, in Emacs 24.1.

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defcustom mouse-drag-copy-region nil
  "If non-nil, copy to kill ring upon mouse adjustments of the region.

This affects `mouse-save-then-kill' (\\[mouse-save-then-kill]) in
addition to mouse drags.

If this variable is `non-empty', only copy to the kill ring if
the region is non-empty.  For instance, if you mouse drag an area
that is less than a half a character, you'd normally get the
empty string in your kill ring, but with this value, this short
mouse drag won't affect the kill ring.

This variable applies only to mouse adjustments in Emacs, not
selecting and adjusting regions in other windows."
  :type '(choice (const :tag "No" nil)
                 (const :tag "Yes" t)
                 (const :tag "Non-empty" non-empty))
  :version "24.1")