[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-h
From: |
Dmitry Gutov |
Subject: |
[elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook |
Date: |
Sun, 10 Aug 2014 16:33:01 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 21a6d83c325a24fc65f2738b8622e30bdd129f10
Author: Dmitry Gutov <address@hidden>
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)
- [elpa] branch master updated (4834a3f -> 41ef088), Dmitry Gutov, 2014/08/10
- [elpa] 01/07: Use magit-revert-buffer-hook, Dmitry Gutov, 2014/08/10
- [elpa] 03/07: require 'fringe, Dmitry Gutov, 2014/08/10
- [elpa] 05/07: diff-hl-margin-mode: use buffer-local minor mode, Dmitry Gutov, 2014/08/10
- [elpa] 06/07: Bump the version, Dmitry Gutov, 2014/08/10
- [elpa] 07/07: Merge commit '3f49d2b3934e69d11410d08f1be8e0011237c11c' from diff-hl, Dmitry Gutov, 2014/08/10
- [elpa] 02/07: Some README updates, Dmitry Gutov, 2014/08/10
- [elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook,
Dmitry Gutov <=