;;; Code:
+(require 'diff-hl)
+
;;;###autoload
(define-minor-mode diff-hl-amend-mode
"Show changes against the second-last revision in `diff-hl-mode'.
-Most useful with VCSes that support rewriting local commits, and
-'amending' the most recent one in particular.
+Most useful with backends that support rewriting local commits,
+and most importantly, 'amending' the most recent one.
Currently only supports Git, Mercurial and Bazaar."
:lighter " Amend"
(if diff-hl-amend-mode
(progn
- (if vc-mode
- (diff-hl-amend-setup)
- (add-hook 'find-file-hook 'diff-hl-amend-setup nil t))
+ (diff-hl-amend-setup)
(add-hook 'after-revert-hook 'diff-hl-amend-setup nil t))
- (remove-hook 'find-file-hook 'diff-hl-amend-setup t)
(remove-hook 'after-revert-hook 'diff-hl-amend-setup t)
(setq-local diff-hl-reference-revision nil))
(when diff-hl-mode