[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d6b7d82 05/42: Support the "next" Magit version
From: |
Dmitry Gutov |
Subject: |
[elpa] master d6b7d82 05/42: Support the "next" Magit version |
Date: |
Wed, 09 Sep 2015 19:03:26 +0000 |
branch: master
commit d6b7d82fb618d9ed59b31de1dc3846776f023fc5
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Support the "next" Magit version
Closes #41
---
README.md | 2 +-
diff-hl.el | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/README.md b/README.md
index 325f53e..0f9fe64 100644
--- a/README.md
+++ b/README.md
@@ -87,4 +87,4 @@ Magit
-----
If you have a recent enough version installed, it defines
-`magit-revert-buffer-hook`, which we use.
+`magit-revert-buffer-hook` (or `magit-not-reverted-hook`), which we use.
diff --git a/diff-hl.el b/diff-hl.el
index 22a877a..a3e5447 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -453,6 +453,9 @@ in the source file, or the last line of the hunk above it."
;; doesn't care about changed VC state.
;; https://github.com/magit/magit/issues/603
(add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t)
+ ;; Magit 2+ doesn't do the above and calls this instead,
+ ;; but only when it doesn't call `revert-buffer':
+ (add-hook 'magit-not-reverted-hook 'diff-hl-update nil t)
(add-hook 'auto-revert-mode-hook 'diff-hl-update nil t)
(add-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps nil t))
(remove-hook 'after-save-hook 'diff-hl-update t)
@@ -461,6 +464,7 @@ in the source file, or the last line of the hunk above it."
(remove-hook 'vc-checkin-hook 'diff-hl-update t)
(remove-hook 'after-revert-hook 'diff-hl-update t)
(remove-hook 'magit-revert-buffer-hook 'diff-hl-update t)
+ (remove-hook 'magit-not-reverted-hook 'diff-hl-update t)
(remove-hook 'auto-revert-mode-hook 'diff-hl-update t)
(remove-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps t)
(diff-hl-remove-overlays)))
- [elpa] master updated (cde5d9a -> a454a24), Dmitry Gutov, 2015/09/09
- [elpa] master 38a83db 01/42: Add documentation for diff-hl-dired-status-files., Dmitry Gutov, 2015/09/09
- [elpa] master 5bfb314 03/42: Move diff-hl-margin-side after diff-hl-margin-mode definition, Dmitry Gutov, 2015/09/09
- [elpa] master 1743a80 07/42: Merge pull request #42 from tarsius/silentio, Dmitry Gutov, 2015/09/09
- [elpa] master eb92f0e 04/42: Merge pull request #39 from jamessan/diff-hl-margin-load-error, Dmitry Gutov, 2015/09/09
- [elpa] master d188525 02/42: Merge pull request #37 from holocronweaver/documentation, Dmitry Gutov, 2015/09/09
- [elpa] master 4959c6e 10/42: Autoload diff-hl-dired-mode-unless-remote, Dmitry Gutov, 2015/09/09
- [elpa] master d6b7d82 05/42: Support the "next" Magit version,
Dmitry Gutov <=
- [elpa] master 934fef0 11/42: Promote diff-hl-margin-side to diff-hl-side, Dmitry Gutov, 2015/09/09
- [elpa] master 28263c7 12/42: Handle narrowing (fixes #48), Dmitry Gutov, 2015/09/09
- [elpa] master 84d5110 09/42: Bump the copyright years, Dmitry Gutov, 2015/09/09
- [elpa] master 12def16 14/42: Allow bitmap width only up to 16 (#49), Dmitry Gutov, 2015/09/09
- [elpa] master bf27c41 15/42: vc-disable-async-diff: Don't bind when it's undefined, Dmitry Gutov, 2015/09/09
- [elpa] master 7ea8159 16/42: Define diff-hl-command-map without destroying existing bindings, Dmitry Gutov, 2015/09/09
- [elpa] master 733ad33 06/42: silence byte-compiler, Dmitry Gutov, 2015/09/09
- [elpa] master 028b2bf 17/42: Merge pull request #51 from tarsius/keep-bindings, Dmitry Gutov, 2015/09/09
- [elpa] master 327e01c 20/42: Add commentary to diff-hl-flydiff, Dmitry Gutov, 2015/09/09
- [elpa] master 75d4bdc 08/42: Remove CR characters, Dmitry Gutov, 2015/09/09