Function: hmouse-drag-region

hmouse-drag-region is an interactive and byte-compiled function defined in hmouse-sh.el.

Signature

(hmouse-drag-region START-EVENT)

Documentation

Set the region to the text that the mouse is dragged over.

If not the start of a region drag-and-drop, and hyperbole-mode is enabled, then depress the Action Key.

Highlight the drag area as you move the mouse. This must be bound to a button-down mouse event. In Transient Mark mode, the highlighting remains as long as the mark remains active. Otherwise, it remains until the next input event.

When the region already exists and variable mouse-drag-and-drop-region(var)/mouse-drag-and-drop-region(fun) is non-nil, this moves the entire region of text to where mouse is dragged over to.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-sh.el
;; Based on mouse-drag-region from Emacs mouse.el.
(defun hmouse-drag-region (start-event)
  "Set the region to the text that the mouse is dragged over.
If not the start of a region drag-and-drop, and hyperbole-mode is
enabled, then depress the Action Key.

Highlight the drag area as you move the mouse.
This must be bound to a button-down mouse event.
In Transient Mark mode, the highlighting remains as long as the mark
remains active.  Otherwise, it remains until the next input event.

When the region already exists and variable `mouse-drag-and-drop-region'
is non-nil, this moves the entire region of text to where mouse
is dragged over to."
  (interactive "e")
  (if (and mouse-drag-and-drop-region
           (not (member 'triple (event-modifiers start-event)))
           (equal (mouse-posn-property (event-start start-event) 'face) 'region))
      (mouse-drag-and-drop-region start-event)
    ;; Give temporary modes such as isearch a chance to turn off.
    (run-hooks 'mouse-leave-buffer-hook)
    (when hyperbole-mode
      (action-key-depress start-event))
    (mouse-drag-track start-event)))