Function: hmouse-yank-region

hmouse-yank-region is a byte-compiled function defined in hui-window.el.

Signature

(hmouse-yank-region)

Documentation

Yank the region of text saved in hkey-region into the current buffer.

Signals an error if the buffer is read-only.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-window.el
(defun hmouse-yank-region ()
  "Yank the region of text saved in `hkey-region' into the current buffer.
Signals an error if the buffer is read-only."
  ;; If a region was just selected for yanking, deactivate it as we
  ;; have already copied the region into `hkey-region'.
  (when hkey-region
    (hmouse-goto-region-prev-point)
    (if (region-active-p) (deactivate-mark))
    (hmouse-goto-release-point)
    (if buffer-read-only
	;; In this case, we want an error that will terminate execution so that
	;; hkey-region is not reset to nil.  This allows the user to fix the
	;; problem and then to try yanking again.
	(error "(hmouse-yank-region): Buffer is read-only; use {%s} to enable yanking"
	       (hmouse-read-only-toggle-key))
      ;; Permanently return to release point
      (let ((release-window (if assist-flag assist-key-release-window action-key-release-window)))
	(select-frame-set-input-focus (window-frame release-window))
	(select-window release-window))
      ;; Protect from indentation errors
      (ignore-errors (hmouse-insert-region)))))