diff options
Diffstat (limited to 'lisp/vc/diff-mode.el')
| -rw-r--r-- | lisp/vc/diff-mode.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 9afb9f47e91..f3455efb294 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1817,6 +1817,16 @@ With a prefix argument, try to REVERSE the hunk." (diff-hunk-status-msg line-offset (diff-xor reverse switched) t))) +(defun diff-kill-applied-hunks () + "Kill all hunks that have already been applied starting at point." + (interactive) + (while (not (eobp)) + (pcase-let ((`(,buf ,line-offset ,pos ,src ,_dst ,switched) + (diff-find-source-location nil nil))) + (if (and line-offset switched) + (diff-hunk-kill) + (diff-hunk-next))))) + (defalias 'diff-mouse-goto-source 'diff-goto-source) (defun diff-goto-source (&optional other-file event) |
