From 1c996a073d2749475b19ea1176b1bf3287162534 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 23 Jan 2016 11:22:27 +0300 Subject: [PATCH] Add diff-hl-mark-hunk #63 --- diff-hl.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/diff-hl.el b/diff-hl.el index b8407884e..63c2cde18 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -445,6 +445,14 @@ in the source file, or the last line of the hunk above it." (interactive) (diff-hl-next-hunk t)) +(defun diff-hl-mark-hunk () + (interactive) + (let ((hunk (diff-hl-hunk-overlay-at (point)))) + (unless hunk + (error "No hunk at point")) + (goto-char (overlay-start hunk)) + (push-mark (overlay-end hunk) nil t))) + (defvar diff-hl-command-map (let ((map (make-sparse-keymap))) (define-key map "n" 'diff-hl-revert-hunk) -- 2.39.2