Function: hui:kill-region

hui:kill-region is an autoloaded, interactive and byte-compiled function defined in hui.el.

Signature

(hui:kill-region BEG END &optional REGION INTERACTIVE-FLAG)

Documentation

Kill ("cut") between highlighted point and mark else thing at point.

The text is deleted but saved in the kill ring. The command C-y (yank) can retrieve it from there.
(If you want to kill and then yank immediately, use M-x copy-region-as-kill (copy-region-as-kill).)

This is the primitive for programs to kill text (as opposed to deleting it). Supply two arguments, character positions indicating the stretch of text to be killed. Any command that calls this function is a "kill command". If the previous command was also a kill command, the text killed this time appends to the text killed last time to make one entry in the kill ring. Patched to remove the most recent completion.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui.el
;; In "hyperbole.el", use this to override the {C-w} command from
;; either "completion.el" or "simple.el" when hyperbole-mode is active
;; to allow killing kcell references, active regions and delimited
;; areas (like sexpressions).
;;;###autoload
(defun hui:kill-region (beg end &optional region interactive-flag)
  "Kill (\"cut\") between highlighted point and mark else thing at point.
The text is deleted but saved in the kill ring.
The command \\[yank] can retrieve it from there.
\(If you want to kill and then yank immediately, use \\[copy-region-as-kill].)

This is the primitive for programs to kill text (as opposed to deleting it).
Supply two arguments, character positions indicating the stretch of text
to be killed.
Any command that calls this function is a \"kill command\".
If the previous command was also a kill command,
the text killed this time appends to the text killed last time
to make one entry in the kill ring.
Patched to remove the most recent completion."
  ;; Pass mark first, then point, because the order matters when
  ;; calling `kill-append'.
  (interactive (list (when mark-active (mark))
		     (when mark-active (point))
		     'region t))
  (when transient-mark-mode
    (cond ((or (use-region-p)
	       (not interactive-flag))
	   (unless (and beg end)
	     (setq beg (region-beginning)
		   end (region-end))))
	  ;; Setting the major mode prevents hui-select from
	  ;; suppressing use of `hui-select-syntax-table'
	  ;; if in one of `hui-select-ignore-quoted-sexp-modes'.
	  ((let* ((major-mode 'fundamental-mode)
		  thing-and-bounds)
	     (when (setq thing-and-bounds (hui:selectable-thing-and-bounds))
	       (setq beg (nth 2 thing-and-bounds)
		     end (nth 3 thing-and-bounds)
		     region nil)
	       t)))))

  ;; If there is no mark, this call should trigger an error
  (if (and (null beg) (null end) (eq (mark t) (point)))
      (hui:kill-region-internal (mark t) (point) region)
    (hui:kill-region-internal beg end region)))