]> code.delx.au - gnu-emacs-elpa/commitdiff
auto-revert-mode integration
authorSune Simonsen <sune@we-knowhow.dk>
Tue, 9 Dec 2014 09:54:06 +0000 (10:54 +0100)
committerSune Simonsen <sune@we-knowhow.dk>
Tue, 9 Dec 2014 13:08:00 +0000 (14:08 +0100)
Update diff-hl when auto-revert-mode-hook is called.

diff-hl.el

index b78c939b4555a192e804f3b7d772246cb6dc7218..8f675a322ce2733f0ed41d9f33c2410b8e2a2d8e 100644 (file)
@@ -449,6 +449,7 @@ in the source file, or the last line of the hunk above it."
         ;; doesn't care about changed VC state.\r
         ;; https://github.com/magit/magit/issues/603\r
         (add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t)\r
+        (add-hook 'auto-revert-mode-hook 'diff-hl-update nil t)\r
         (add-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps nil t))\r
     (remove-hook 'after-save-hook 'diff-hl-update t)\r
     (remove-hook 'after-change-functions 'diff-hl-edit t)\r
@@ -456,6 +457,7 @@ in the source file, or the last line of the hunk above it."
     (remove-hook 'vc-checkin-hook 'diff-hl-update t)\r
     (remove-hook 'after-revert-hook 'diff-hl-update t)\r
     (remove-hook 'magit-revert-buffer-hook 'diff-hl-update t)\r
+    (remove-hook 'auto-revert-mode-hook 'diff-hl-update t)\r
     (remove-hook 'text-scale-mode-hook 'diff-hl-define-bitmaps t)\r
     (diff-hl-remove-overlays)))\r
 \r