Function: diff-file-kill

diff-file-kill is an interactive and byte-compiled function defined in diff-mode.el.gz.

Signature

(diff-file-kill)

Documentation

Kill current file's hunks.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-file-kill ()
  "Kill current file's hunks."
  (interactive)
  (if (not (diff--some-hunks-p))
      (error "No hunks")
    (diff-beginning-of-hunk t)
    (let ((inhibit-read-only t))
      (apply #'kill-region (diff-bounds-of-file)))
    (ignore-errors (diff-beginning-of-hunk t))))