dgutov pushed a commit to branch master in repository elpa. commit 21a6d83c325a24fc65f2738b8622e30bdd129f10 Author: Dmitry Gutov <dgu...@yandex.ru> Date: Sun Aug 10 20:27:02 2014 +0400
diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook ...in the best case. --- diff-hl.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/diff-hl.el b/diff-hl.el index da1f1a4..be1000a 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -425,9 +425,10 @@ in the source file, or the last line of the hunk above it." (diff-hl-maybe-define-bitmaps) (add-hook 'after-save-hook 'diff-hl-update nil t) (add-hook 'after-change-functions 'diff-hl-edit nil t) - (if vc-mode - (diff-hl-update) - (add-hook 'find-file-hook 'diff-hl-update t t)) + (add-hook (if vc-mode + 'diff-hl-mode-on-hook + 'find-file-hook) + 'diff-hl-update t t) (add-hook 'vc-checkin-hook 'diff-hl-update nil t) (add-hook 'after-revert-hook 'diff-hl-update nil t) (add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t)