Function: diff-file-kill
diff-file-kill is an interactive and byte-compiled function defined in
diff-mode.el.gz.
Signature
(diff-file-kill &optional DELETE)
Documentation
Kill current file's hunks.
When called from Lisp with optional argument DELETE non-nil, delete them, instead.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-file-kill (&optional delete)
"Kill current file's hunks.
When called from Lisp with optional argument DELETE non-nil, delete
them, instead."
(interactive)
(if (not (diff--some-hunks-p))
(error "No hunks")
(diff-beginning-of-hunk t)
(let ((inhibit-read-only t))
(apply (if delete #'delete-region #'kill-region)
(diff-bounds-of-file)))
(ignore-errors (diff-beginning-of-hunk t))))