Function: hkey-throw-and-stay
hkey-throw-and-stay is an autoloaded, interactive and byte-compiled
function defined in hmouse-drv.el.
Signature
(hkey-throw-and-stay RELEASE-WINDOW &optional THROW-REGION-FLAG)
Documentation
Throw a thing to display in RELEASE-WINDOW.
Throw one of:
- the active (highlighted) region,
- a displayable item at point or
- the current buffer.
With optional prefix arg THROW-REGION-FLAG, throw the current region
even if not active.
The selected window does not change.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-drv.el
;;;###autoload
(defun hkey-throw-and-stay (release-window &optional throw-region-flag)
"Throw a thing to display in RELEASE-WINDOW.
Throw one of:
- the active (highlighted) region,
- a displayable item at point or
- the current buffer.
With optional prefix arg THROW-REGION-FLAG, throw the current region
even if not active.
The selected window does not change."
(interactive (list (ace-window nil) current-prefix-arg))
(let ((depress-frame (selected-frame))
(display-delay (if (boundp 'temp-display-delay)
temp-display-delay
0.5)))
;; Throw either the region or the item at point and keep selected-window
(let ((action-key-depress-window (selected-window))
(action-key-release-window release-window)
(action-key-depress-args))
(hypb:save-selected-window-and-input-focus
(unless (hkey-insert-region action-key-depress-window release-window throw-region-flag display-delay)
(if (cadr (assq major-mode hmouse-drag-item-mode-forms))
(hmouse-item-to-window)
(set-window-buffer release-window (current-buffer))))
(unless (eq depress-frame (window-frame release-window))
;; Force redisplay or item buffer won't be displayed here.
(redisplay t)
;; Show the frame thrown to before it is covered when
;; input-focus is returned to the depress-frame.
(raise-frame (window-frame release-window))
;; Don't use sit-for here because it can be interrupted early.
(sleep-for display-delay))))))