[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/diff-hl bc02c99 08/25: Add variable to ask for confirma
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/diff-hl bc02c99 08/25: Add variable to ask for confirmation when reverting a hunk |
Date: |
Sun, 20 Dec 2020 05:07:00 -0500 (EST) |
branch: externals/diff-hl
commit bc02c991e973eaa4f851a057cedf0b193381fb0c
Author: Erick Navarro <erick@navarro.io>
Commit: Erick Navarro <erick@navarro.io>
Add variable to ask for confirmation when reverting a hunk
---
diff-hl.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/diff-hl.el b/diff-hl.el
index 9cfb2e5..d30c0a9 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -97,6 +97,11 @@
:group 'diff-hl
:type 'boolean)
+(defcustom diff-hl-ask-before-revert-hunk t
+ "Non-nil to ask for confirmation before revert a hunk."
+ :group 'diff-hl
+ :type 'boolean)
+
(defcustom diff-hl-highlight-function 'diff-hl-highlight-on-fringe
"Function to highlight the current line. Its arguments are
overlay, change type and position within a hunk."
@@ -458,9 +463,10 @@ in the source file, or the last line of the hunk above it."
(recenter 1)))
(when diff-auto-refine-mode
(diff-refine-hunk))
- (unless (yes-or-no-p (format "Revert current hunk in %s? "
- ,(cl-caadr fileset)))
- (user-error "Revert canceled"))
+ (if diff-hl-ask-before-revert-hunk
+ (unless (yes-or-no-p (format "Revert current hunk in %s? "
+ ,(cl-caadr fileset)))
+ (user-error "Revert canceled")))
(let ((diff-advance-after-apply-hunk nil))
(save-window-excursion
(diff-apply-hunk t)))
- [elpa] externals/diff-hl updated (8fa2d1b -> a0028d9), Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 1f35974 01/25: Fix windows getting messed up (Issue #125), Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl ccf89ec 02/25: Fix #128, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 9c1c95c 03/25: Fix typo, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl f95d123 04/25: Merge pull request #129 from tarsiiformes/typo, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 3418630 05/25: diff-hl-flydiff-buffer-with-head: Honor diff-hl-reference-revision, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl fb9eb1c 06/25: Merge pull request #127 from m-cat/diff-apply-hunk, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 2cf8b48 07/25: Avoid the "args out of range error", Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl bc02c99 08/25: Add variable to ask for confirmation when reverting a hunk,
Dmitry Gutov <=
- [elpa] externals/diff-hl ba6cf44 12/25: Add tests., Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 7fce94f 09/25: Merge pull request #137 from erickgnavar/feature/ask-for-confirmation-on-revert-hunk, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl ab2f4f0 13/25: Merge pull request #140 from mookid/fix-indirect-buffers, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 2281a89 17/25: Update docstring and untabify, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl a625033 10/25: Update Magit bridge to use the recommended approach, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl f3b2d15 11/25: diff-hl-diff-goto-hunk, diff-hl-revert-hunk: handle indirect buffers., Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 176f931 14/25: Support buffers in 'conflict' state as well, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl 165a30f 16/25: Merge pull request #143 from walseb/master, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl c58098c 15/25: Added option to not automatically enable diff-hl in certain major-modes, Dmitry Gutov, 2020/12/20
- [elpa] externals/diff-hl d1b9a2b 18/25: Add global-diff-hl-amend-mode to diff-hl custom group, Dmitry Gutov, 2020/12/20