Refactor how git-timemachine loads magit-blame

Loading magit-blame immediately after git-timemachine is premature, only
one command uses magit-blame (git-timemachine-blame), so we defer it
until that command is called (also, it makes more sense to be in the
emacs/vc module, than tools/magit).
This commit is contained in:
Henrik Lissner 2018-07-28 12:56:52 +02:00
parent c87c2bd5a6
commit d094162d31
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,10 @@
(after! evil
;; Force evil to rehash keybindings for the current state
(add-hook 'git-timemachine-mode-hook #'evil-normalize-keymaps)))
(add-hook 'git-timemachine-mode-hook #'evil-normalize-keymaps))
(when (featurep! :tools magit)
(add-transient-hook! #'git-timemachine-blame (require 'magit-blame))))
;; `git-commit-mode'

View file

@ -38,9 +38,6 @@ load everything.")
(define-key magit-status-mode-map [remap magit-mode-bury-buffer] #'+magit/quit))
(def-package! magit-blame :after git-timemachine)
(def-package! magit-todos
:hook (magit-mode . magit-todos-mode)
:config