summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-git.el33
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index 5affb59..6860744 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -1,8 +1,8 @@
(add-to-list 'load-path "~/src/emacs/git-modes")
(add-to-list 'load-path "~/src/emacs/magit")
-(require 'magit)
-(autoload 'magit-blame-mode "magit-blame" nil t)
+(require 'magit-autoloads)
+(require 'git-modes-autoloads)
(require-package 'git-annex)
(require 'git-annex)
@@ -13,9 +13,6 @@
(key-chord-define-global ",g" 'magit-status)
-(define-key magit-popup-mode-map (kbd "SPC <t>") 'magit-invoke-popup-switch)
-(define-key magit-popup-mode-map (kbd "SPC SPC <t>") 'magit-invoke-popup-option)
-
(defun km/magit-auto-commit ()
"Commit all changes with \"auto\" commit message.
Useful for non-source code repos (e.g., Org mode note files)."
@@ -49,17 +46,6 @@ Useful for non-source code repos (e.g., Org mode note files)."
(magit-run-git "branch" (concat "b/" current-branch))
(user-error "No current branch")))
-(magit-define-popup-action 'magit-commit-popup
- ?u "Auto commit" 'km/magit-auto-commit)
-(magit-define-popup-action 'magit-push-popup
- ?a "Push all" 'km/magit-push-all)
-(magit-define-popup-action 'magit-log-popup
- ?a "All branches" 'km/magit-log-all-branches)
-(magit-define-popup-action 'magit-branch-popup
- ?t "Local tracking" 'km/magit-checkout-local-tracking)
-(magit-define-popup-action 'magit-branch-popup
- ?s "Backup current branch" 'km/magit-backup-branch)
-
;; http://whattheemacsd.com/setup-magit.el-01.html
(defadvice magit-status (around magit-fullscreen activate)
ad-do-it
@@ -73,4 +59,19 @@ Useful for non-source code repos (e.g., Org mode note files)."
(setq vc-follow-symlinks t)
+(after 'magit
+ (define-key magit-popup-mode-map (kbd "SPC <t>") 'magit-invoke-popup-switch)
+ (define-key magit-popup-mode-map (kbd "SPC SPC <t>") 'magit-invoke-popup-option)
+
+ (magit-define-popup-action 'magit-commit-popup
+ ?u "Auto commit" 'km/magit-auto-commit)
+ (magit-define-popup-action 'magit-push-popup
+ ?a "Push all" 'km/magit-push-all)
+ (magit-define-popup-action 'magit-log-popup
+ ?a "All branches" 'km/magit-log-all-branches)
+ (magit-define-popup-action 'magit-branch-popup
+ ?t "Local tracking" 'km/magit-checkout-local-tracking)
+ (magit-define-popup-action 'magit-branch-popup
+ ?s "Backup current branch" 'km/magit-backup-branch))
+
(provide 'init-git)