Function: diff-hunk-kill
diff-hunk-kill is an interactive and byte-compiled function defined in
diff-mode.el.gz.
Signature
(diff-hunk-kill &optional BEG END)
Documentation
Kill the hunk at point.
When killing the last hunk left for a file, kill the file header too. Interactively, if the region is active, kill all hunks that the region overlaps.
When called from Lisp with optional arguments BEG and END non-nil, kill all hunks overlapped by the region from BEG to END as though called interactively with an active region delimited by BEG and END.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-hunk-kill (&optional beg end)
"Kill the hunk at point.
When killing the last hunk left for a file, kill the file header too.
Interactively, if the region is active, kill all hunks that the region
overlaps.
When called from Lisp with optional arguments BEG and END non-nil, kill
all hunks overlapped by the region from BEG to END as though called
interactively with an active region delimited by BEG and END."
(interactive "R")
(when (xor beg end)
(error "Invalid call to `diff-hunk-kill'"))
(diff--revert-kill-hunks beg end nil))