[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1c996a0 2/6: Add diff-hl-mark-hunk
From: |
Dmitry Gutov |
Subject: |
[elpa] master 1c996a0 2/6: Add diff-hl-mark-hunk |
Date: |
Wed, 03 Feb 2016 23:03:36 +0000 |
branch: master
commit 1c996a073d2749475b19ea1176b1bf3287162534
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Add diff-hl-mark-hunk
#63
---
diff-hl.el | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/diff-hl.el b/diff-hl.el
index b840788..63c2cde 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)
- [elpa] master updated (d33fb54 -> 7e8c4e9), Dmitry Gutov, 2016/02/03
- [elpa] master 1c996a0 2/6: Add diff-hl-mark-hunk,
Dmitry Gutov <=
- [elpa] master 167a2dd 1/6: Add diff-hl-dired-ignored-backends, Dmitry Gutov, 2016/02/03
- [elpa] master 3a46453 4/6: Fix typo, Dmitry Gutov, 2016/02/03
- [elpa] master fdbf34a 3/6: Implement integration with Magit 2.4, Dmitry Gutov, 2016/02/03
- [elpa] master f4edea2 5/6: Bump the version, Dmitry Gutov, 2016/02/03
- [elpa] master 7e8c4e9 6/6: Merge commit 'f4edea201bc4c38d082ec3143ceec87d2dcadb37' from diff-hl, Dmitry Gutov, 2016/02/03