From c204f8f923bc87b106b5706dd3e82d89fd2d15a2 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Fri, 6 Sep 2013 12:03:16 +0300 Subject: [PATCH] diff-hl-amend-mode: Don't defer via find-file-hook Simpler model at the cost of +1 external process call (#11). --- diff-hl-amend.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/diff-hl-amend.el b/diff-hl-amend.el index 3f65cb751..713f83824 100644 --- a/diff-hl-amend.el +++ b/diff-hl-amend.el @@ -34,11 +34,8 @@ 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 -- 2.39.2